diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-15 20:31:04 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-15 20:31:04 -0700 |
| commit | 4c83442e174b186f5ee22bc8744cc7cc2a890e13 (patch) | |
| tree | 515c5c1b9be97cf876b32bd5359f88ecc7e1aa8a /docs/man | |
| parent | cc13903167e540c0e306ed7faa0b58a8bcd12066 (diff) | |
| download | nng-4c83442e174b186f5ee22bc8744cc7cc2a890e13.tar.gz nng-4c83442e174b186f5ee22bc8744cc7cc2a890e13.tar.bz2 nng-4c83442e174b186f5ee22bc8744cc7cc2a890e13.zip | |
Stats API converted to mdbook.
A number of small errors were fixed, and we tried to restructure
this to be a bit more usable to readers.
Diffstat (limited to 'docs/man')
| -rw-r--r-- | docs/man/libnng.3.adoc | 46 | ||||
| -rw-r--r-- | docs/man/nng_stat.5.adoc | 81 | ||||
| -rw-r--r-- | docs/man/nng_stat_bool.3.adoc | 50 | ||||
| -rw-r--r-- | docs/man/nng_stat_child.3.adoc | 51 | ||||
| -rw-r--r-- | docs/man/nng_stat_desc.3.adoc | 52 | ||||
| -rw-r--r-- | docs/man/nng_stat_find.3.adoc | 51 | ||||
| -rw-r--r-- | docs/man/nng_stat_find_dialer.3.adoc | 55 | ||||
| -rw-r--r-- | docs/man/nng_stat_find_listener.3.adoc | 55 | ||||
| -rw-r--r-- | docs/man/nng_stat_find_socket.3.adoc | 55 | ||||
| -rw-r--r-- | docs/man/nng_stat_name.3.adoc | 46 | ||||
| -rw-r--r-- | docs/man/nng_stat_next.3.adoc | 48 | ||||
| -rw-r--r-- | docs/man/nng_stat_string.3.adoc | 54 | ||||
| -rw-r--r-- | docs/man/nng_stat_timestamp.3.adoc | 60 | ||||
| -rw-r--r-- | docs/man/nng_stat_type.3.adoc | 95 | ||||
| -rw-r--r-- | docs/man/nng_stat_unit.3.adoc | 86 | ||||
| -rw-r--r-- | docs/man/nng_stat_value.3.adoc | 50 | ||||
| -rw-r--r-- | docs/man/nng_stats_get.3.adoc | 86 |
17 files changed, 23 insertions, 998 deletions
diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc index 4183c316..0df0990d 100644 --- a/docs/man/libnng.3.adoc +++ b/docs/man/libnng.3.adoc @@ -229,29 +229,29 @@ that route messages from one socket to another. |xref:nng_device.3.adoc[nng_device()]|message forwarding device |=== -=== Statistics +// === Statistics -The following functions provide access to statistics which can be used -to observe program behaviors and as an aid in troubleshooting. +// The following functions provide access to statistics which can be used +// to observe program behaviors and as an aid in troubleshooting. -|=== -|xref:nng_stat_bool.3.adoc[nng_stat_bool()]|get statistic Boolean value -|xref:nng_stat_child.3.adoc[nng_stat_child()]|get child statistic -|xref:nng_stat_desc.3.adoc[nng_stat_name()]|get statistic description -|xref:nng_stat_find.3.adoc[nng_stat_find()]|find statistic by name -|xref:nng_stat_find_dialer.3.adoc[nng_stat_find_dialer()]|find dialer statistics -|xref:nng_stat_find_listener.3.adoc[nng_stat_find_listener()]|find listener statistics -|xref:nng_stat_find_socket.3.adoc[nng_stat_find_socket()]|find socket statistics -|xref:nng_stat_name.3.adoc[nng_stat_name()]|get statistic name -|xref:nng_stat_next.3.adoc[nng_stat_next()]|get next statistic -|xref:nng_stat_string.3.adoc[nng_stat_string()]|get statistic string value -|xref:nng_stat_timestamp.3.adoc[nng_stat_timestamp()]|get statistic timestamp -|xref:nng_stat_type.3.adoc[nng_stat_type()]|get statistic type -|xref:nng_stat_unit.3.adoc[nng_stat_unit()]|get statistic unit -|xref:nng_stat_value.3.adoc[nng_stat_value()]|get statistic numeric value -|xref:nng_stats_free.3.adoc[nng_stats_free()]|free statistics -|xref:nng_stats_get.3.adoc[nng_stats_get()]|get statistics -|=== +// |=== +// |xref:nng_stat_bool.3.adoc[nng_stat_bool()]|get statistic Boolean value +// |xref:nng_stat_child.3.adoc[nng_stat_child()]|get child statistic +// |xref:nng_stat_desc.3.adoc[nng_stat_name()]|get statistic description +// |xref:nng_stat_find.3.adoc[nng_stat_find()]|find statistic by name +// |xref:nng_stat_find_dialer.3.adoc[nng_stat_find_dialer()]|find dialer statistics +// |xref:nng_stat_find_listener.3.adoc[nng_stat_find_listener()]|find listener statistics +// |xref:nng_stat_find_socket.3.adoc[nng_stat_find_socket()]|find socket statistics +// |xref:nng_stat_name.3.adoc[nng_stat_name()]|get statistic name +// |xref:nng_stat_next.3.adoc[nng_stat_next()]|get next statistic +// |xref:nng_stat_string.3.adoc[nng_stat_string()]|get statistic string value +// |xref:nng_stat_timestamp.3.adoc[nng_stat_timestamp()]|get statistic timestamp +// |xref:nng_stat_type.3.adoc[nng_stat_type()]|get statistic type +// |xref:nng_stat_unit.3.adoc[nng_stat_unit()]|get statistic unit +// |xref:nng_stat_value.3.adoc[nng_stat_value()]|get statistic numeric value +// |xref:nng_stats_free.3.adoc[nng_stats_free()]|free statistics +// |xref:nng_stats_get.3.adoc[nng_stats_get()]|get statistics +// |=== // === URL Object @@ -275,9 +275,9 @@ to observe program behaviors and as an aid in troubleshooting. // |xref:nng_log_logger.3.adoc[nng_log_set_logger()]|set logging handler // |=== -=== Supplemental API +// === Supplemental API -NOTE: All these functions have been moved to new mdbook docs. +// NOTE: All these functions have been moved to new mdbook docs. // These supplemental functions are not intrinsic to building // network applications with _NNG_, but they are made available diff --git a/docs/man/nng_stat.5.adoc b/docs/man/nng_stat.5.adoc deleted file mode 100644 index 218bafb2..00000000 --- a/docs/man/nng_stat.5.adoc +++ /dev/null @@ -1,81 +0,0 @@ -= nng_stat(5) - -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. - -== NAME - -nng_stat - statistic - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; ----- - -== DESCRIPTION - -An `nng_stat`(((statistic))) represents a statistic. -All statistics have names (xref:nng_stat_name.3.adoc[`nng_stat_name()`]) and -descriptions (xref:nng_stat_desc.3.adoc[`nng_stat_desc()`]), and are -typed (xref:nng_stat_type.3.adoc[`nng_stat_type()`]). - -Most statistics are numeric, -and thus carry a value (xref:nng_stat_value.3.adoc[`nng_stat_value()`]) -and frequently also a unit that the value measures (xref:nng_stat_unit.3.adoc[`nng_stat_unit()`]). - -Some statistics however, are simply strings (xref:nng_stat_string.3.adoc[`nng_stat_string()`]), -and thus carry no numeric value. - -Statistics are organized as a tree, and any given statistic can have siblings -(xref:nng_stat_next.3.adoc[`nng_stat_next()`]). -Note however that generally only `NNG_STAT_SCOPE` statistics, which are -act as placeholders in the tree (and carry no value), -will have children (xref:nng_stat_child.3.adoc[`nng_stat_child()`]). - -A tree of statistics is collected using xref:nng_stats_get.3.adoc[`nng_stats_get()`], -and can be freed when no longer needed with xref:nng_stats_free.3.adoc[`nng_stats_free()`]. -This collection process is generally performed in a way to minimize impact -to running operations, but there is still some impact caused by collection -of statistics. - -The time when a statistic's value is captured can be obtained using -xref:nng_stat_timestamp.3.adoc[`nng_stat_timestamp()`], which is useful for -measuring rates of change in certain statistics. - -NOTE: The presence, names, and meanings of any given statistic are -subject to change at any time. These statistics are provided as an aid -for debugging, and should generally not be relied upon for programmatic -behaviors. - -NOTE: Statistics may be disabled by build-time configuration options, -in order to reduce program size and run-time overheads. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_free.3.adoc[nng_stats_free(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat_child.3.adoc[nng_stat_child(3)], -xref:nng_stat_desc.3.adoc[nng_stat_desc(3)], -xref:nng_stat_find.3.adoc[nng_stat_find(3)], -xref:nng_stat_find_dialer.3.adoc[nng_stat_find_dialer(3)], -xref:nng_stat_find_listener.3.adoc[nng_stat_find_listener(3)], -xref:nng_stat_find_socket.3.adoc[nng_stat_find_socket(3)], -xref:nng_stat_name.3.adoc[nng_stat_name(3)], -xref:nng_stat_next.3.adoc[nng_stat_next(3)], -xref:nng_stat_string.3.adoc[nng_stat_string(3)], -xref:nng_stat_timestamp.3.adoc[nng_stat_timestamp(3)], -xref:nng_stat_type.3.adoc[nng_stat_type(3)], -xref:nng_stat_unit.3.adoc[nng_stat_unit(3)], -xref:nng_stat_value.3.adoc[nng_stat_value(3)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_bool.3.adoc b/docs/man/nng_stat_bool.3.adoc deleted file mode 100644 index 678b45aa..00000000 --- a/docs/man/nng_stat_bool.3.adoc +++ /dev/null @@ -1,50 +0,0 @@ -= nng_stat_bool(3) -// -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_bool - get statistic Boolean value - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -bool nng_stat_bool(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_bool()` function returns the Boolean value for the statistic _stat_. -Otherwise, if the statistic is not of Boolean type, the result is indeterminate. -See xref:nng_stat_type.3.adoc[`nng_stat_type()`] for a description of statistic types. - -== RETURN VALUES - -The boolean value associated with _stat_. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat_type.3.adoc[nng_stat_type(3)], -xref:nng_stat_unit.3.adoc[nng_stat_unit(3)], -xref:nng_stat_value.3.adoc[nng_stat_value(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_child.3.adoc b/docs/man/nng_stat_child.3.adoc deleted file mode 100644 index 123ca82d..00000000 --- a/docs/man/nng_stat_child.3.adoc +++ /dev/null @@ -1,51 +0,0 @@ -= nng_stat_child(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_child - get child statistic - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -nng_stat *nng_stat_child(nng_stat *parent); ----- - -== DESCRIPTION - -The `nng_stat_child()` function returns the first child statistic of the -statistic _parent_. -If no children are present, then `NULL` is returned. - -TIP: Only statistics with type (see xref:nng_stat_type.3.adoc[`nng_stat_type()`]) -of `NNG_STAT_SCOPE` will have children. - -== RETURN VALUES - -The first child statistic of _parent_, or NULL if _parent_ has no children. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stat_next.3.adoc[nng_stat_next(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_desc.3.adoc b/docs/man/nng_stat_desc.3.adoc deleted file mode 100644 index e87849d3..00000000 --- a/docs/man/nng_stat_desc.3.adoc +++ /dev/null @@ -1,52 +0,0 @@ -= nng_stat_desc(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_desc - get statistic description - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -const char *nng_stat_desc(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_desc()` function returns a brief, human-readable description -for the statistic _stat_. - -TIP: This description can be used for a tool-tip in user interfaces -displaying these statistic values. - -NOTE: At this time, only English descriptions are provided. - -== RETURN VALUES - -The description of statistic _stat_. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stat_name.3.adoc[nng_stats_name(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_find.3.adoc b/docs/man/nng_stat_find.3.adoc deleted file mode 100644 index cdcf461f..00000000 --- a/docs/man/nng_stat_find.3.adoc +++ /dev/null @@ -1,51 +0,0 @@ -= nng_stat_find(3) - -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. - -== NAME - -nng_stat_find - find statistic by name - -== SYNOPSIS - -[source,c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -nng_stat *nng_stat_find(nng_stat *stat, const char *name); ----- - -== DESCRIPTION - -The `nng_stat_find()` function searches the statistics tree _stat_, looking for a statistic whose name is _name_. -If it finds one, it returns it. -Otherwise `NULL` is returned. - -NOTE: If multiple statistics have that name, then only the first match is returned. - -== RETURN VALUES - -The matching statistic, or NULL if no match is found. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stat_child.3.adoc[nng_stat_child(3)], -xref:nng_stat_find_dialer.3.adoc[nng_stat_find_dialer(3)], -xref:nng_stat_find_listener.3.adoc[nng_stat_find_listner(3)], -xref:nng_stat_find_socket.3.adoc[nng_stat_find_socket(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_find_dialer.3.adoc b/docs/man/nng_stat_find_dialer.3.adoc deleted file mode 100644 index 202fd289..00000000 --- a/docs/man/nng_stat_find_dialer.3.adoc +++ /dev/null @@ -1,55 +0,0 @@ -= nng_stat_find_dialer(3) - -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. - -== NAME - -nng_stat_find_dialer - find dialer statistics - -== SYNOPSIS - -[source,c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; -typedef struct nng_dialer nng_dialer; - -nng_stat *nng_stat_find_dialer(nng_stat *stat, nng_dialer dialer); ----- - -== DESCRIPTION - -The `nng_stat_find_dialer()` function returns the statistics tree within _stat_ associated with the dialer _dialer_, if such a tree exists. -Otherwise `NULL` is returned. - -Generally, there will be child statistics of the returned value, each corresponding to a specific metric. -These can be further scanned using either -xref:nng_stat_find.3.adoc[nng_stat_find(3)] -or by walking the tree with -xref:nng_stat_child.3.adoc[nng_stat_child(3)]. - -== RETURN VALUES - -The matching statistic, or NULL if no match is found. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stat_child.3.adoc[nng_stat_child(3)], -xref:nng_stat_find.3.adoc[nng_stat_find(3)], -xref:nng_stat_find_listener.3.adoc[nng_stat_find_listener(3)], -xref:nng_stat_find_socket.3.adoc[nng_stat_find_socket(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_find_listener.3.adoc b/docs/man/nng_stat_find_listener.3.adoc deleted file mode 100644 index 46c2dc74..00000000 --- a/docs/man/nng_stat_find_listener.3.adoc +++ /dev/null @@ -1,55 +0,0 @@ -= nng_stat_find_listener(3) - -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. - -== NAME - -nng_stat_find_listener - find listener statistics - -== SYNOPSIS - -[source,c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; -typedef struct nng_listener nng_listener; - -nng_stat *nng_stat_find_listener(nng_stat *stat, nng_listener listener); ----- - -== DESCRIPTION - -The `nng_stat_find_listener()` function returns the statistics tree within _stat_ associated with the listener _listener_, if such a tree exists. -Otherwise `NULL` is returned. - -Generally, there will be child statistics of the returned value, each corresponding to a specific metric. -These can be further scanned using either -xref:nng_stat_find.3.adoc[nng_stat_find(3)] -or by walking the tree with -xref:nng_stat_child.3.adoc[nng_stat_child(3)]. - -== RETURN VALUES - -The matching statistic, or NULL if no match is found. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stat_child.3.adoc[nng_stat_child(3)], -xref:nng_stat_find.3.adoc[nng_stat_find(3)], -xref:nng_stat_find_dialer.3.adoc[nng_stat_find_dialer(3)], -xref:nng_stat_find_socket.3.adoc[nng_stat_find_socket(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_find_socket.3.adoc b/docs/man/nng_stat_find_socket.3.adoc deleted file mode 100644 index deea509c..00000000 --- a/docs/man/nng_stat_find_socket.3.adoc +++ /dev/null @@ -1,55 +0,0 @@ -= nng_stat_find_socket(3) - -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. - -== NAME - -nng_stat_find_socket - find socket statistics - -== SYNOPSIS - -[source,c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; -typedef struct nng_socket nng_socket; - -nng_stat *nng_stat_find_socket(nng_stat *stat, nng_socket socket); ----- - -== DESCRIPTION - -The `nng_stat_find_socket()` function returns the statistics tree within _stat_ associated with the socket _socket_, if such a tree exists. -Otherwise `NULL` is returned. - -Generally, there will be child statistics of the returned value, each corresponding to a specific metric. -These can be further scanned using either -xref:nng_stat_find.3.adoc[nng_stat_find(3)] -or by walking the tree with -xref:nng_stat_child.3.adoc[nng_stat_child(3)]. - -== RETURN VALUES - -The matching statistic, or NULL if no match is found. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stat_child.3.adoc[nng_stat_child(3)], -xref:nng_stat_find.3.adoc[nng_stat_find(3)], -xref:nng_stat_find_dialer.3.adoc[nng_stat_find_dialer(3)], -xref:nng_stat_find_listener.3.adoc[nng_stat_find_listener(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_name.3.adoc b/docs/man/nng_stat_name.3.adoc deleted file mode 100644 index bf2fd3c7..00000000 --- a/docs/man/nng_stat_name.3.adoc +++ /dev/null @@ -1,46 +0,0 @@ -= nng_stat_name(3) - -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. - -== NAME - -nng_stat_name - get statistic name - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -const char *nng_stat_name(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_name()` function returns the name for the statistic _stat_. - -NOTE: The global root statistic will have the empty string ("") as it's name. - -== RETURN VALUES - -The name of statistic _stat_. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_next.3.adoc b/docs/man/nng_stat_next.3.adoc deleted file mode 100644 index 00caa5c8..00000000 --- a/docs/man/nng_stat_next.3.adoc +++ /dev/null @@ -1,48 +0,0 @@ -= nng_stat_next(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_next - get next statistic - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -nng_stat *nng_stat_next(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_next()` function returns the next sibling statistic of the -statistic _stat_. -If no more siblings are present, then `NULL` is returned. - -== RETURN VALUES - -The next sibling statistic of _stat_, or NULL if _stat_ is the last sibling. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stat_child.3.adoc[nng_stat_child(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_string.3.adoc b/docs/man/nng_stat_string.3.adoc deleted file mode 100644 index 4c65fb1a..00000000 --- a/docs/man/nng_stat_string.3.adoc +++ /dev/null @@ -1,54 +0,0 @@ -= nng_stat_string(3) -// -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_string - get statistic string value - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -const char *nng_stat_string(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_string()` function returns a string value for the statistic _stat_, -which must be of type `NNG_STAT_STRING` (see xref:nng_stat_type.3.adoc[`nng_stat_type(3)`]). - -If the statistic is not of type `NNG_STAT_STRING`, then `NULL` will be returned. - -NOTE: The returned string is valid until xref:nng_stats_free.3.adoc[`nng_stats_free()`] is called to -free the memory for the snapshot. - -== RETURN VALUES - -The string value associated with _stat_, or `NULL` if the statistic is not -a string type. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat_type.3.adoc[nng_stats_type(3)], -xref:nng_stat_value.3.adoc[nng_stats_value(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_timestamp.3.adoc b/docs/man/nng_stat_timestamp.3.adoc deleted file mode 100644 index 74d827e8..00000000 --- a/docs/man/nng_stat_timestamp.3.adoc +++ /dev/null @@ -1,60 +0,0 @@ -= nng_stat_timestamp(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_timestamp - get statistic timestamp - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -uint64_t nng_stat_timestamp(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_timestamp()` function returns the a timestamp, which is measured -as a number of milliseconds since some arbitrary value in the past. - -Even within the same snapshot, statistics might have different timestamp -values, as the timestamp represents the time when that particular statistic -was captured. - -TIP: These values are intended to facilitate calculation of rates, by -comparing values from one snapshot with a subsequent one. - -TIP: The values used here have the same offset as the -xref:nng_clock.3supp.adoc[`nng_clock()`] supplemental function. -This can be useful when converting these values to local clock time. - -== RETURN VALUES - -The timestamp when _stat_ was captured, measured as a number of -milliseconds since some time in the past. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat_value.3.adoc[nng_stat_value(3)], -xref:nng_clock.3supp.adoc[nng_clock(3supp)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_type.3.adoc b/docs/man/nng_stat_type.3.adoc deleted file mode 100644 index a2578e5e..00000000 --- a/docs/man/nng_stat_type.3.adoc +++ /dev/null @@ -1,95 +0,0 @@ -= nng_stat_type(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_type - get statistic type - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -enum { - NNG_STAT_SCOPE, - NNG_STAT_LEVEL, - NNG_STAT_COUNTER, - NNG_STAT_STRING, - NNG_STAT_BOOLEAN, - NNG_STAT_ID -}; - -int nng_stat_type(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_type()` function returns the type of the statistic _stat_. - -The returned type will be one of the following values: - -((`NNG_STAT_SCOPE`)):: -This is a placeholder providing scope, and carries no value on its own. -Instead it is a parent node with child statistics (see -xref:nng_stat_child.3.adoc[`nng_stat_child()`].) - -((`NNG_STAT_LEVEL`)):: -This is a numeric statistic, but its value is a level, so rate calculations -based on changes in this value should not be considered significant. - -((`NNG_STAT_COUNTER`)):: -This is a numeric statistic that represents an increasing count, typically -of events, messages, or bytes. -Frequently, it is interesting to consider changes in this statistic divided -by time to obtain a rate. -(For example, throughput might be calculated as changes in a byte counter -divided by the interval over which the change occurred.) - -((`NNG_STAT_STRING`)):: -This is a string, and carries no numeric value. -Instead the xref:nng_stat_string.3.adoc[`nng_stat_string()`] function -should be used to obtain the value. - -((`NNG_STAT_BOOLEAN`)):: -This is a boolean value. -The xref:nng_stat_value.3.adoc[`nng_stat_value()`] function will return zero -to represent a `false` value, and one to represent a `true` value. - -((`NNG_STAT_ID`)): -The statistic is a numeric ID. -These are generally immutable values that represent an identity that might -be used with another interface. - -TIP: For `NNG_STAT_COUNTER` and `NNG_STAT_LEVEL` statistics, the -xref:nng_stat_unit.3.adoc[`nng_stat_unit()`] function will provide more -detail about the units measured by the static. - -== RETURN VALUES - -The statistic type for _stat_. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat_string.3.adoc[nng_stat_string(3)], -xref:nng_stat_unit.3.adoc[nng_stat_unit(3)], -xref:nng_stat_value.3.adoc[nng_stat_value(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_unit.3.adoc b/docs/man/nng_stat_unit.3.adoc deleted file mode 100644 index f7136e1f..00000000 --- a/docs/man/nng_stat_unit.3.adoc +++ /dev/null @@ -1,86 +0,0 @@ -= nng_stat_unit(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_unit - get statistic unit - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -enum { - NNG_UNIT_NONE, - NNG_UNIT_BYTES, - NNG_UNIT_MESSAGES, - NNG_UNIT_MILLIS, - NNG_UNIT_EVENTS -}; - -int nng_stat_unit(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_unit()` function returns the unit of quantity measured -by the statistic _stat_. - -The returned value will be one of the following values: - -((`NNG_UNIT_NONE`)):: -There are no particular units measured. -In some cases there may be units, but the type of the unit will be obvious -from the name (see xref:nng_stat_name.3.adoc[`nng_stat_name()`]) of the statistic. - -((`NNG_UNIT_BYTES`)):: -The statistic is a count of bytes. - -((`NNG_UNIT_MESSAGES`)):: -The statistic is a count of messages. -Typically, one message corresponds to a single xref:nng_msg.5.adoc[`nng_msg`] structure. - -((`NNG_UNIT_MILLIS`)):: -The statistic is a count of milliseconds. - -((`NNG_STAT_EVENTS`)):: -The statistic is a count of some other type of event. - -For statistics that are neither `NNG_STAT_COUNTER` nor `NNG_STAT_LEVEL` -type (see xref:nng_stat_type.3.adoc[`nng_stat_type()`]), the unit will -generally be `NNG_UNIT_NONE`. - -TIP: Normally rates can be calculated for `NNG_STAT_COUNTER` values for -any of these units, but for `NNG_UNIT_MILLIS` rate calculations are generally -meaningless. - -== RETURN VALUES - -The units measured by _stat_. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat_name.3.adoc[nng_stat_name(3)], -xref:nng_stat_type.3.adoc[nng_stat_type(3)], -xref:nng_stat_value.3.adoc[nng_stat_value(3)], -xref:nng_msg.5.adoc[nng_msg(5)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stat_value.3.adoc b/docs/man/nng_stat_value.3.adoc deleted file mode 100644 index d5d28473..00000000 --- a/docs/man/nng_stat_value.3.adoc +++ /dev/null @@ -1,50 +0,0 @@ -= nng_stat_value(3) -// -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stat_value - get statistic numeric value - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -uint64_t nng_stat_value(nng_stat *stat); ----- - -== DESCRIPTION - -The `nng_stat_value()` function returns a numeric value for the statistic _stat_. -If the statistic is not of numeric type, then zero is returned. -See xref:nng_stat_type.3.adoc[`nng_stat_type()`] for a description of statistic types. - -== RETURN VALUES - -The numeric value associated with _stat_. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng_stats_get.3.adoc[nng_stats_get(3)], -xref:nng_stat_bool.3.adoc[nng_stat_bool(3)], -xref:nng_stat_type.3.adoc[nng_stat_type(3)], -xref:nng_stat_unit.3.adoc[nng_stat_unit(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_stats_get.3.adoc b/docs/man/nng_stats_get.3.adoc deleted file mode 100644 index 5cbb2624..00000000 --- a/docs/man/nng_stats_get.3.adoc +++ /dev/null @@ -1,86 +0,0 @@ -= nng_stats_get(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_stats_get - get statistics snapshot - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_stat nng_stat; - -int nng_stats_get(nng_stat **statsp) ----- - -== DESCRIPTION - -The `nng_stat_get()` function attempts to obtain a snapshot of all the -various diagnostic statistics that are present in the system. - -NOTE: The process of collecting statistics is designed to have minimal -impact on the system, but there is still some impact. - -The statistics are organized as a tree, rooted with a parent -statistic of type `NNG_STAT_SCOPE` that carries no value, and which -has an empty name. -This parent statistic is returned through the _statsp_ pointer. - -The xref:nng_stat_child.3.adoc[`nng_stat_child()`] and -xref:nng_stat_next.3.adoc[`nng_stat_next()`] function can be used to -iterate over the the tree. - -When no longer needed, the statistics can be freed with the -xref:nng_stats_free.3.adoc[`nng_stats_free()`] function, but that -function must be called only with the root statistic that is returned -through the _statsp_ pointer. - -NOTE: The values of individual statistics are guaranteed to be atomic, -but due the way statistics are collected there can be discrepancies between them at certain times. -For example, statistics counting bytes and messages received may not -reflect the same number of messages, depending on when the snapshot is taken. -This potential inconsistency arises as a result of optimizations to minimize -the impact of statistics on actual operations. - -NOTE: The names, values, and semantics of statistics provided may change -from release to release. -These are provided for informational and debugging use only, and applications -should not rely on the presence, names, or meanings of any individual statistics. - -== RETURN VALUES - -This function returns a pointer to the allocated memory on success, -and `NULL` otherwise. - -== ERRORS - -[horizontal] -`NNG_ENOMEM`:: Insufficient free memory to collect statistics. -`NNG_ENOTSUP`:: Statistics are not supported (compile time option). - -== SEE ALSO - -[.text-left] -xref:nng_stats_free.3.adoc[nng_stats_free(3)], -xref:nng_stat_child.3.adoc[nng_stat_child(3)], -xref:nng_stat_desc.3.adoc[nng_stat_desc(3)], -xref:nng_stat_name.3.adoc[nng_stat_name(3)], -xref:nng_stat_next.3.adoc[nng_stat_next(3)], -xref:nng_stat_string.3.adoc[nng_stat_string(3)], -xref:nng_stat_type.3.adoc[nng_stat_type(3)], -xref:nng_stat_timestamp.3.adoc[nng_stat_timestamp(3)], -xref:nng_stat_unit.3.adoc[nng_stat_unit(3)], -xref:nng_stat_value.3.adoc[nng_stat_value(3)], -xref:nng_stat.5.adoc[nng_stat(5)], -xref:nng.7.adoc[nng(7)] |
