34flow::util::stat::Histogram_counter make_payload_sz_histo(
size_t max_payload_size,
size_t bucket_sz)
36 assert((max_payload_size >= 1) &&
"max_payload_size must be >= 1.");
38 const auto remainder = max_payload_size % bucket_sz;
39 const auto bucket0_sz = (remainder == 0) ? bucket_sz : remainder;
41 return flow::util::stat::Histogram_counter{
size_t(2) + ((max_payload_size -
size_t(1)) / bucket_sz),
43 int64_t(bucket_sz), 0};
51 m_histo_payload_sz(make_payload_sz_histo(max_payload_size, S_PAYLOAD_SZ_HISTO_BUCKET_SZ))
62 m_histo_payload_sz(make_payload_sz_histo(max_payload_size, S_PAYLOAD_SZ_HISTO_BUCKET_SZ))
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.
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.
Cumulative stats from the incoming-direction (receive) pipe of a Blob_receiver or Native_handle_recei...
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...
Cumulative stats from the outgoing-direction (send) pipe of a Blob_sender or Native_handle_sender con...
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...