build_stats()
#
build_stats()
constructs a JSON object containing statistical data extracted from the attributes of a given hgobj
instance, including attributes marked with SFD_STATS
flags.
Prototype
json_t *build_stats(
hgobj gobj,
const char *stats,
json_t *kw,
hgobj src
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The |
|
|
A string specifying which statistics to include. If |
|
|
A JSON object containing additional parameters. This object is decremented after use. |
|
|
The source |
Return Value
A JSON object containing the collected statistics, structured by the short names of the hgobj
instances.
Notes
Internally, _build_stats()
is used to extract statistics from the hgobj
instance and its bottom-level objects.
The function iterates through the hierarchy of hgobj
instances, aggregating statistics from each level.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples