ark::comms::SocketStatsTracker
Defined in header “ark/comms/socket_stats_tracker.hh”.
Thread safe class for computing the socket statistics. Used to compute both overall (packets received/bytes received) and compute rate information.
Methods
- 
void set_address(const std::string & address) 
 Set the socket address.
- 
void set_bound(bool bound) 
 Set whether this socket is bound or not.
- 
void packet_received(size_t size) 
 Update the statistics based on the received packet information.
- 
void packet_sent(size_t size) 
 Update the statistics based on the sent packet information.
- 
void egress_packet_dropped(size_t size) 
 Indicates that an egress packet was dropped, with the given size.
- 
void set_current_egress_buffer_size(size_t size) 
 Updates the current local buffer size for this socket. This is the amount of memory allocated locally to store egress data.
- 
SocketStats get_stats(std::chrono::steady_clock::time_point ts) 
 Get the current statistics structure computing rates based on the provided time and the previous time this function was called.