Mads
Multi-Agent Distributed System
Loading...
Searching...
No Matches
Mads::TopicStat Struct Reference

Snapshot of one topic's aggregated activity, as computed by TopicStats::snapshot() at a given instant. More...

#include <topic_stats.hpp>

Public Attributes

std::string topic
 
size_t window_messages = 0
 
size_t window_bytes = 0
 
double messages_per_second = 0.0
 
double bytes_per_second = 0.0
 
size_t total_messages = 0
 Lifetime message count for this topic, never pruned by the window.
 
std::chrono::steady_clock::time_point last_seen {}
 Wall-clock-independent instant of the most recent record() call.
 
size_t last_size = 0
 
std::string last_sample
 

Detailed Description

Snapshot of one topic's aggregated activity, as computed by TopicStats::snapshot() at a given instant.

Definition at line 34 of file topic_stats.hpp.

Member Data Documentation

◆ bytes_per_second

double Mads::TopicStat::bytes_per_second = 0.0

Definition at line 42 of file topic_stats.hpp.

◆ last_sample

std::string Mads::TopicStat::last_sample

Short caller-supplied preview of the last payload (e.g. a truncated JSON dump or a blob summary); empty if record() was never given one.

Definition at line 50 of file topic_stats.hpp.

◆ last_seen

std::chrono::steady_clock::time_point Mads::TopicStat::last_seen {}

Wall-clock-independent instant of the most recent record() call.

Definition at line 46 of file topic_stats.hpp.

◆ last_size

size_t Mads::TopicStat::last_size = 0

Definition at line 47 of file topic_stats.hpp.

◆ messages_per_second

double Mads::TopicStat::messages_per_second = 0.0

Definition at line 41 of file topic_stats.hpp.

◆ topic

std::string Mads::TopicStat::topic

Definition at line 35 of file topic_stats.hpp.

◆ total_messages

size_t Mads::TopicStat::total_messages = 0

Lifetime message count for this topic, never pruned by the window.

Definition at line 44 of file topic_stats.hpp.

◆ window_bytes

size_t Mads::TopicStat::window_bytes = 0

Definition at line 40 of file topic_stats.hpp.

◆ window_messages

size_t Mads::TopicStat::window_messages = 0

Messages/bytes seen within the trailing window ending at the snapshot instant (the values messages_per_second/bytes_per_second are derived from).

Definition at line 39 of file topic_stats.hpp.


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