Event statistics structure. More...
#include <Event.hpp>
Collaboration diagram for utl::EventStats:Public Member Functions | |
| void | reset () |
| Reset all statistics. | |
| double | getEventsPerSecond () const |
| Get events per second rate. | |
Public Attributes | |
| std::uint64_t | totalEventsPublished = 0 |
| Total events published. | |
| std::uint64_t | totalEventsConsumed = 0 |
| Total events consumed. | |
| std::uint64_t | totalEventsExpired = 0 |
| Total events that expired. | |
| std::uint64_t | currentQueueSize = 0 |
| Current queue size. | |
| std::uint64_t | maxQueueSize = 0 |
| Maximum queue size reached. | |
| std::chrono::steady_clock::time_point | startTime |
| Statistics start time. | |
| std::unordered_map< EventType, std::uint64_t > | eventTypeCount |
| Count per event type. | |
| std::unordered_map< EventPriority, std::uint64_t > | priorityCount |
| Count per priority. | |
| std::unordered_map< std::uint32_t, std::uint64_t > | sourceCount |
| Count per source component. | |
| std::unordered_map< std::uint32_t, std::uint64_t > | targetCount |
| Count per target component. | |
|
inline |
Get events per second rate.
Definition at line 200 of file Event.hpp.
References startTime, and totalEventsPublished.
|
inline |
Reset all statistics.
Definition at line 182 of file Event.hpp.
References currentQueueSize, eventTypeCount, maxQueueSize, priorityCount, sourceCount, startTime, targetCount, totalEventsConsumed, totalEventsExpired, and totalEventsPublished.
Referenced by utl::EventBus::clearStats(), and utl::EventBus::EventBus().
Here is the caller graph for this function:| std::uint64_t utl::EventStats::currentQueueSize = 0 |
Current queue size.
Definition at line 171 of file Event.hpp.
Referenced by utl::EventBus::getStats(), and reset().
| std::unordered_map<EventType, std::uint64_t> utl::EventStats::eventTypeCount |
Count per event type.
Definition at line 174 of file Event.hpp.
Referenced by reset(), and utl::EventBus::updateStats().
| std::uint64_t utl::EventStats::maxQueueSize = 0 |
| std::unordered_map<EventPriority, std::uint64_t> utl::EventStats::priorityCount |
Count per priority.
Definition at line 175 of file Event.hpp.
Referenced by reset(), and utl::EventBus::updateStats().
| std::unordered_map<std::uint32_t, std::uint64_t> utl::EventStats::sourceCount |
Count per source component.
Definition at line 176 of file Event.hpp.
Referenced by reset(), and utl::EventBus::updateStats().
| std::chrono::steady_clock::time_point utl::EventStats::startTime |
Statistics start time.
Definition at line 173 of file Event.hpp.
Referenced by getEventsPerSecond(), and reset().
| std::unordered_map<std::uint32_t, std::uint64_t> utl::EventStats::targetCount |
Count per target component.
Definition at line 177 of file Event.hpp.
Referenced by reset(), and utl::EventBus::updateStats().
| std::uint64_t utl::EventStats::totalEventsConsumed = 0 |
Total events consumed.
Definition at line 169 of file Event.hpp.
Referenced by reset(), and utl::EventBus::updateStats().
| std::uint64_t utl::EventStats::totalEventsExpired = 0 |
Total events that expired.
Definition at line 170 of file Event.hpp.
Referenced by reset(), and utl::EventBus::updateStats().
| std::uint64_t utl::EventStats::totalEventsPublished = 0 |
Total events published.
Definition at line 168 of file Event.hpp.
Referenced by getEventsPerSecond(), reset(), and utl::EventBus::updateStats().