stats_parser()#
stats_parser() generates a JSON-formatted statistical report by extracting relevant attributes from the given hgobj instance and formatting them into a structured response.
Prototype
json_t *stats_parser(
hgobj gobj,
const char *stats,
json_t *kw,
hgobj src
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
The |
|
|
A string specifying which statistics to retrieve. If |
|
|
A JSON object containing additional parameters. Ownership is transferred to |
|
|
The source |
Return Value
A JSON object containing the formatted statistical report. The caller assumes ownership of the returned object.
Notes
Internally, stats_parser() calls build_stats() to generate the statistical data.
The function wraps the generated statistics in a standard command response format before returning.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples