From 566f932d422ffa9f6316d55cba21831173b1b2fc Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Tue, 31 Dec 2024 09:23:59 -0800 Subject: docs: statistics updates, document nng_stat_parent (fixes #1896) --- docs/ref/api/stats.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/ref/api') diff --git a/docs/ref/api/stats.md b/docs/ref/api/stats.md index 2e0acfcd..1720f605 100644 --- a/docs/ref/api/stats.md +++ b/docs/ref/api/stats.md @@ -56,6 +56,7 @@ The {{i:`nng_stats_free`}} function deallocates the snapshot referenced by _stat ```c const nng_stat *nng_stat_child(const nng_stat *stat); const nng_stat *nng_stat_next(const nng_stat *stat); +const nng_stat *nng_stat_parent(const nng_stat *stat); ``` Traversing the tree of statistics is done using the {{i:`nng_stat_child`}} and @@ -67,6 +68,9 @@ or `NULL` if the _stat_ has no children. The `nng_stat_next` function returns the nearest sibling to the right of _stat_, or `NULL` if _stat_ has no more siblings to the right. +The {{i:`nng_stat_parent`}} function returns the parent of _stat_, or `NULL` if +_stat_ is the root of the statistics tree. + ## Finding a Statistic ```c -- cgit v1.2.3-70-g09d2