CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
cmlabs::ComponentStats Struct Reference

Legacy per-component throughput counters (DataMessageHeader-based rings). More...

#include <ComponentData.h>

Collaboration diagram for cmlabs::ComponentStats:
[legend]

Public Member Functions

std::string toXML ()
 Serialize counters and recent messages as a <componentstats> XML element.

Public Attributes

uint64 time
 Timestamp of the last update (µs).
uint64 msgInCount
 Total messages received.
uint64 msgInBytes
 Total bytes received.
DataMessageHeader recentInMsg [10]
uint64 msgOutCount
 Total messages posted.
uint64 msgOutBytes
 Total bytes posted.
DataMessageHeader recentOutMsg [10]
uint64 runCount
 Total runs.
uint64 runUserTime
uint64 runKernelTime
char recentInMsg [10 *DRAFTMSGSIZE]
 Ring of the 10 most recent inbound message drafts.
char recentOutMsg [10 *DRAFTMSGSIZE]
 Ring of the 10 most recent outbound message drafts.
uint64 firstRunStartTime
 Timestamp of the first run (µs).
uint64 currentRunStartTime
 Timestamp the current/last run started (µs).
uint64 cycleCount
 Total processing cycles.
uint32 migrationCount
 Times this component has migrated.
uint64 usageCPUTicks
 Cumulative CPU ticks consumed.
uint32 recentInPos
uint32 recentOutPos

Detailed Description

Legacy per-component throughput counters (DataMessageHeader-based rings).

Per-component throughput counters and recent-message rings (in shared memory).

Warning
Shared-memory layout; see MemoryManager.h for the ABI/rebuild warning.

Same ring scheme as ProcessStats: 10 DRAFTMSGSIZE-byte draft slots per direction.

Warning
Shared-memory layout; see MemoryManager.h for the ABI/rebuild warning.

Definition at line 52 of file ComponentData.h.

Member Function Documentation

◆ toXML()

std::string cmlabs::ComponentStats::toXML ( )
inline

Serialize counters and recent messages as a <componentstats> XML element.

Returns
XML fragment.

Definition at line 98 of file ComponentMemory.h.

References DRAFTMSGSIZE, msgInBytes, msgInCount, msgOutBytes, msgOutCount, recentInMsg, recentOutMsg, runCount, cmlabs::utils::StringFormat(), cmlabs::DataMessage::swapMessageData(), time, and cmlabs::DataMessage::toXML().

Member Data Documentation

◆ currentRunStartTime

uint64 cmlabs::ComponentStats::currentRunStartTime

Timestamp the current/last run started (µs).

Definition at line 90 of file ComponentMemory.h.

Referenced by cmlabs::ComponentMemory::addComponentStats(), and cmlabs::ComponentMemory::addLocalPerformanceStats().

◆ cycleCount

uint64 cmlabs::ComponentStats::cycleCount

◆ firstRunStartTime

uint64 cmlabs::ComponentStats::firstRunStartTime

Timestamp of the first run (µs).

Definition at line 89 of file ComponentMemory.h.

Referenced by cmlabs::ComponentMemory::addComponentStats(), and cmlabs::ComponentMemory::addLocalPerformanceStats().

◆ migrationCount

uint32 cmlabs::ComponentStats::migrationCount

Times this component has migrated.

Definition at line 93 of file ComponentMemory.h.

Referenced by cmlabs::ComponentMemory::addLocalPerformanceStats(), and cmlabs::ComponentMemory::setComponentData().

◆ msgInBytes

uint64 cmlabs::ComponentStats::msgInBytes

◆ msgInCount

uint64 cmlabs::ComponentStats::msgInCount

◆ msgOutBytes

uint64 cmlabs::ComponentStats::msgOutBytes

◆ msgOutCount

uint64 cmlabs::ComponentStats::msgOutCount

◆ recentInMsg [1/2]

char cmlabs::ComponentStats::recentInMsg[10 *DRAFTMSGSIZE]

Ring of the 10 most recent inbound message drafts.

Definition at line 85 of file ComponentMemory.h.

◆ recentInMsg [2/2]

DataMessageHeader cmlabs::ComponentStats::recentInMsg[10]

◆ recentInPos

uint32 cmlabs::ComponentStats::recentInPos

Definition at line 95 of file ComponentMemory.h.

Referenced by cmlabs::ComponentMemory::addComponentStats().

◆ recentOutMsg [1/2]

char cmlabs::ComponentStats::recentOutMsg[10 *DRAFTMSGSIZE]

Ring of the 10 most recent outbound message drafts.

Definition at line 88 of file ComponentMemory.h.

◆ recentOutMsg [2/2]

DataMessageHeader cmlabs::ComponentStats::recentOutMsg[10]

Definition at line 59 of file ComponentData.h.

Referenced by cmlabs::ComponentMemory::addComponentStats(), and toXML().

◆ recentOutPos

uint32 cmlabs::ComponentStats::recentOutPos

Definition at line 96 of file ComponentMemory.h.

Referenced by cmlabs::ComponentMemory::addComponentStats().

◆ runCount

uint64 cmlabs::ComponentStats::runCount

◆ runKernelTime

uint64 cmlabs::ComponentStats::runKernelTime

Definition at line 62 of file ComponentData.h.

◆ runUserTime

uint64 cmlabs::ComponentStats::runUserTime

Definition at line 61 of file ComponentData.h.

◆ time

uint64 cmlabs::ComponentStats::time

Timestamp of the last update (µs).

Definition at line 53 of file ComponentData.h.

Referenced by cmlabs::ComponentData::AddComponentStats(), cmlabs::ComponentMemory::addComponentStats(), and toXML().

◆ usageCPUTicks

uint64 cmlabs::ComponentStats::usageCPUTicks

The documentation for this struct was generated from the following files: