From 66ff33813a8cd9d4cba96280bb613762fb0c2ce2 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 11 Nov 2020 21:29:54 -0800 Subject: fixes #1323 stats framework is *way* to heavy This should reduce the amount of copying, and the overall size used by pipes and other objects quite a bit. (On my system, the sizeof nni_pipe shrank by 400 bytes, for example.) --- include/nng/nng.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/nng/nng.h b/include/nng/nng.h index dd7aed35..32861023 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -1059,6 +1059,11 @@ enum nng_unit_enum { // snapshot was updated, and are undefined until an update is performed. NNG_DECL uint64_t nng_stat_value(nng_stat *); +// nng_stat_value returns returns the actual value of the statistic. +// Statistic values reflect their value at the time that the corresponding +// snapshot was updated, and are undefined until an update is performed. +NNG_DECL bool nng_stat_bool(nng_stat *); + // nng_stat_string returns the string associated with a string statistic, // or NULL if the statistic is not part of the string. The value returned // is valid until the associated statistic is freed. -- cgit v1.2.3-70-g09d2