diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-12-31 09:23:59 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-12-31 09:23:59 -0800 |
| commit | 566f932d422ffa9f6316d55cba21831173b1b2fc (patch) | |
| tree | 8e4ef3d778388b6f8514ae33b2d29d494b27fe3f /docs/ref/api/stats.md | |
| parent | 3db112d2a4c8ca4afcb1f3e958b64f2a9de69982 (diff) | |
| download | nng-566f932d422ffa9f6316d55cba21831173b1b2fc.tar.gz nng-566f932d422ffa9f6316d55cba21831173b1b2fc.tar.bz2 nng-566f932d422ffa9f6316d55cba21831173b1b2fc.zip | |
docs: statistics updates, document nng_stat_parent (fixes #1896)
Diffstat (limited to 'docs/ref/api/stats.md')
| -rw-r--r-- | docs/ref/api/stats.md | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
