21#include <flow/util/stat/stat_set.hpp>
500template<
typename Visitor>
505 FLOW_UTIL_STAT_DECLARE(m_n_shards, GAUGE);
506 FLOW_UTIL_STAT_DECLARE_HI_WMARK(m_n_shards_hi_wmark, m_n_shards);
507 FLOW_UTIL_STAT_DECLARE(m_construct_count, ACCUMULATOR);
508 FLOW_UTIL_STAT_DECLARE(m_disposer_count, ACCUMULATOR);
509 FLOW_UTIL_STAT_DECLARE(m_live_handle_groups, GAUGE);
510 FLOW_UTIL_STAT_DECLARE_HI_WMARK(m_live_handle_groups_hi_wmark, m_live_handle_groups);
511 FLOW_UTIL_STAT_DECLARE(m_destroy_count, ACCUMULATOR);
512 FLOW_UTIL_STAT_DECLARE(m_non_owner_destroy_count, ACCUMULATOR);
515template<
typename Visitor>
520 FLOW_UTIL_STAT_DECLARE(m_lend_count, ACCUMULATOR);
523template<
typename Visitor>
528 FLOW_UTIL_STAT_DECLARE(m_borrow_count, ACCUMULATOR);
529 FLOW_UTIL_STAT_DECLARE(m_disposer_count, ACCUMULATOR);
530 FLOW_UTIL_STAT_DECLARE(m_live_handle_groups, GAUGE);
531 FLOW_UTIL_STAT_DECLARE_HI_WMARK(m_live_handle_groups_hi_wmark, m_live_handle_groups);
534template<
typename Visitor>
539 FLOW_UTIL_STAT_DECLARE(m_live_objects, GAUGE);
540 FLOW_UTIL_STAT_DECLARE_HI_WMARK(m_live_objects_hi_wmark, m_live_objects);
541 FLOW_UTIL_STAT_DECLARE(m_live_object_zombies, GAUGE);
542 FLOW_UTIL_STAT_DECLARE_HI_WMARK(m_live_object_zombies_hi_wmark, m_live_object_zombies);
545template<
typename Visitor>
550 FLOW_UTIL_STAT_DECLARE(m_construct_count, ACCUMULATOR);
551 FLOW_UTIL_STAT_DECLARE(m_construct_disposer_count, ACCUMULATOR);
552 FLOW_UTIL_STAT_DECLARE(m_destroy_count, ACCUMULATOR);
553 FLOW_UTIL_STAT_DECLARE(m_non_owner_destroy_count, ACCUMULATOR);
554 FLOW_UTIL_STAT_DECLARE(m_lend_count, ACCUMULATOR);
555 FLOW_UTIL_STAT_DECLARE(m_borrow_count, ACCUMULATOR);
556 FLOW_UTIL_STAT_DECLARE(m_borrow_disposer_count, ACCUMULATOR);
Stats-related sub-namespace, for ADL segregation and general organization.
void declare_stats(const flow::util::stat::Stat_name &name_prefix, const Owner_obj_stats *src_stats, Owner_obj_stats *target_stats, Visitor &&visitor)
Declares the stats for Owner_obj_stats.
Flow-IPC SHM-module: SHM-provider-agnostic stats about borrowing objects, typically across a process ...
std::atomic< uint64_t > m_disposer_count
Of the shared_ptr groups counted in m_borrow_count, count of the ones for which the disposer has exec...
std::atomic< int64_t > m_live_handle_groups_hi_wmark
Max of m_live_handle_groups observed so far.
std::atomic< uint64_t > m_borrow_count
Count of the arena-or-session's .borrow_object<T>() calls by user.
std::atomic< int64_t > m_live_handle_groups
Gauge: How many groups counted in m_borrow_count have not yet had their disposer execute (as counted ...
Flow-IPC SHM-module: SHM-provider-agnostic stats about an arena if viewed as being capable or lending...
std::atomic< uint64_t > m_lend_count
Count of .lend_object(obj) calls, where shared_ptr<T> obj was obtained as arena.construct<T>(....
Stats struct thematically relevant to gauging outstanding (not-yet-garbage-collected) first-class obj...
std::atomic< uint64_t > m_live_objects_hi_wmark
Max of m_live_objects observed so far.
std::atomic< uint64_t > m_live_object_zombies
Gauge: Of the objects tracked by m_live_objects, the (hopefully small) subset that are ready for GC (...
std::atomic< uint64_t > m_live_objects
Gauge: Count of first-class – arena.construct()ed – objects that have not yet been destroyed (via GC)...
std::atomic< uint64_t > m_live_object_zombies_hi_wmark
Max of m_live_object_zombies observed so far.
Flow-IPC SHM-module: SHM-provider-agnostic stats about an arena object if viewed as solely a memory-m...
unsigned int m_n_shards_hi_wmark
Max of m_n_shards observed so far; ignore if sharding is not used to collect *this.
std::atomic< uint64_t > m_construct_count
Count of the arena object's .construct<T>() calls by user.
std::atomic< uint64_t > m_disposer_count
Of the shared_ptr groups counted in m_construct_count, count of the ones for which the disposer has e...
std::atomic< uint64_t > m_non_owner_destroy_count
Number of times the arena object has destroyed a first-class (construct()ed) object stored in the und...
std::atomic< uint64_t > m_destroy_count
Number of times the arena object has destroyed a first-class (construct()ed) object stored in the und...
std::atomic< int64_t > m_live_handle_groups_hi_wmark
Max of m_live_handle_groups observed so far.
std::atomic< int64_t > m_live_handle_groups
Gauge: How many groups counted in m_construct_count have not yet had their disposer execute (as count...
unsigned int m_n_shards
(Diagnostic gauge) Number of shards used in the aggregated computation of this struct's values (and q...
Stats struct tracking quantities applicable only to the arena-sharing SHM-provider type (at least SHM...
std::atomic< uint64_t > m_construct_disposer_count
Of the shared_ptr groups counted in m_construct_count, count of the ones for which the disposer has e...
std::atomic< uint64_t > m_construct_count
Similar to Owner_obj_stats::m_construct_count but applies to all arena.construct()s executed w/r/t th...
std::atomic< uint64_t > m_lend_count
Similar to Lender_obj_stats::m_lend_count but applies to all arena.lend_object()s executed w/r/t the ...
std::atomic< uint64_t > m_borrow_disposer_count
Of the shared_ptr groups counted in m_borrow_count, count of the ones for which the disposer has exec...
std::atomic< uint64_t > m_non_owner_destroy_count
Of the destructions tracked by m_destroy_count, the subset where a destruction occurs in a different ...
std::atomic< uint64_t > m_destroy_count
Similar to Owner_obj_stats::m_destroy_count but applies to all destructions of construct()ed-objects ...
std::atomic< uint64_t > m_borrow_count
Similar to Borrower_obj_stats::m_borrow_count but applies to all arena.borrow_object()s executed w/r/...