22#include <flow/util/stat/histo.hpp>
23#include <flow/util/stat/stat_set.hpp>
104template<
typename Visitor>
109 FLOW_UTIL_STAT_DECLARE(m_total_msgs, ACCUMULATOR);
110 FLOW_UTIL_STAT_DECLARE(m_total_bytes, ACCUMULATOR);
111 FLOW_UTIL_STAT_DECLARE(m_total_low_lvl_bytes, ACCUMULATOR);
112 FLOW_UTIL_STAT_DECLARE(m_msgs_with_hndls, ACCUMULATOR);
113 FLOW_UTIL_STAT_DECLARE(m_would_block_count, ACCUMULATOR);
114 FLOW_UTIL_STAT_DECLARE(m_auto_pings, ACCUMULATOR);
115 FLOW_UTIL_STAT_DECLARE(m_snd_q_depth, GAUGE);
116 FLOW_UTIL_STAT_DECLARE_HI_WMARK(m_snd_q_hi_wmark, m_snd_q_depth);
117 FLOW_UTIL_STAT_DECLARE(m_histo_payload_sz, ACCUMULATOR);
120template<
typename Stats_t>
182template<
typename Visitor>
187 FLOW_UTIL_STAT_DECLARE(m_total_msgs, ACCUMULATOR);
188 FLOW_UTIL_STAT_DECLARE(m_total_bytes, ACCUMULATOR);
189 FLOW_UTIL_STAT_DECLARE(m_total_low_lvl_bytes, ACCUMULATOR);
190 FLOW_UTIL_STAT_DECLARE(m_msgs_with_hndls, ACCUMULATOR);
191 FLOW_UTIL_STAT_DECLARE(m_auto_pings, ACCUMULATOR);
192 FLOW_UTIL_STAT_DECLARE(m_idle_timeouts, ACCUMULATOR);
193 FLOW_UTIL_STAT_DECLARE(m_histo_payload_sz, ACCUMULATOR);
196template<
typename Stats_t>
Stats-related sub-namespace, for ADL segregation and general organization.
const Blob_rcv_stats & blob_rcv_stats(const Blob_rcv_stats &stats)
Maps a stats struct type to its core Blob_rcv_stats; identity for Blob_rcv_stats itself.
void declare_stats(const flow::util::stat::Stat_name &name_prefix, const Blob_snd_stats *src_stats, Blob_snd_stats *target_stats, Visitor &&visitor)
Declares the stats for Blob_snd_stats.
Blob_snd_stats & blob_snd_stats_mutable(Stats_t &stats)
Non-const wrapper around blob_snd_stats().
const Blob_snd_stats & blob_snd_stats(const Blob_snd_stats &stats)
Maps a stats struct type to its core Blob_snd_stats; identity for Blob_snd_stats itself.
Blob_rcv_stats & blob_rcv_stats_mutable(Stats_t &stats)
Non-const wrapper around blob_rcv_stats().
Cumulative stats from the incoming-direction (receive) pipe of a Blob_receiver or Native_handle_recei...
uint64_t m_total_bytes
Total user blob bytes received (sum of in-message blob sizes).
static constexpr size_t S_PAYLOAD_SZ_HISTO_BUCKET_SZ
Payload-size histogram bucket width (bytes). The last bucket isolates the max payload size.
uint64_t m_total_msgs
Total user messages fully received and delivered.
uint64_t m_idle_timeouts
Number of idle-timeout events. For a {Blob|Native}_handle_receiver as of this writing this cannot exc...
uint64_t m_total_low_lvl_bytes
Total low-level bytes received (user blob bytes plus protocol headers and framing).
Blob_rcv_stats(size_t max_payload_size)
Constructs stats with all counters zeroed and a payload-size histogram sized for the given max payloa...
uint64_t m_msgs_with_hndls
Number of messages received that carried at least one native handle. Currently at most 1 handle per m...
uint64_t m_auto_pings
Number of auto-pings received from the opposing sender.
flow::util::stat::Histogram_counter m_histo_payload_sz
Payload-size histogram for received user messages.
Cumulative stats from the outgoing-direction (send) pipe of a Blob_sender or Native_handle_sender con...
static constexpr size_t S_PAYLOAD_SZ_HISTO_BUCKET_SZ
Payload-size histogram bucket width (bytes). The last bucket isolates the max payload size.
uint64_t m_auto_pings
Number of auto-pings sent (initial from auto_ping() plus periodic timer-fired pings).
flow::util::stat::Histogram_counter m_histo_payload_sz
Payload-size histogram for sent user messages.
uint64_t m_msgs_with_hndls
Number of messages sent that carried at least one native handle. Currently at most 1 handle per messa...
uint64_t m_total_bytes
Total user blob bytes sent (sum of blob sizes from send_*()).
size_t m_snd_q_depth
Current depth of the pending-payloads send queue (queue added-to when would-block occurs).
uint64_t m_total_low_lvl_bytes
Total low-level bytes sent (user blob bytes plus protocol headers and framing).
uint64_t m_total_msgs
Total user messages successfully passed to the low-level send path via send_*().
uint64_t m_would_block_count
Number of times a would-block condition required payload queueing (low-level transport's internal buf...
Blob_snd_stats(size_t max_payload_size)
Constructs stats with all counters zeroed and a payload-size histogram sized for the given max payloa...
size_t m_snd_q_hi_wmark
Max of m_snd_q_depth observed so far.