aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-11-11 21:29:54 -0800
committerGarrett D'Amore <garrett@damore.org>2020-11-11 23:51:13 -0800
commit66ff33813a8cd9d4cba96280bb613762fb0c2ce2 (patch)
tree4d9230b87715ebb1ff876894cd805ee4da42eccb /include
parent53f20bbc4a2bd0d333e0307640883a778de31e2b (diff)
downloadnng-66ff33813a8cd9d4cba96280bb613762fb0c2ce2.tar.gz
nng-66ff33813a8cd9d4cba96280bb613762fb0c2ce2.tar.bz2
nng-66ff33813a8cd9d4cba96280bb613762fb0c2ce2.zip
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.)
Diffstat (limited to 'include')
-rw-r--r--include/nng/nng.h5
1 files changed, 5 insertions, 0 deletions
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.