Next: , Up: System Statistics: Performance Monitoring   [Contents]


B.7.1 STStats: The Telemetry Container

Structure: STStatsEntry

One metric’s running window:

min

Lowest sample seen (double).

max

Highest sample seen (double).

last

Most recent sample (double).

Function: void st_entry_init (STStatsEntry *entry)

Initializes an entry to a neutral empty state.

entry

Entry to initialize.

Returns: Nothing.

Function: void st_entry_update (STStatsEntry *entry, double val)

Folds a new sample into min/max/last.

entry

Entry to update.

val

New sample.

Returns: Nothing.

Function: STStats * st_stats_new (const gchar *name)

Creates a stats object for a named service/process.

name

Service or process label stored with the metrics.

Returns: New STStats.

Function: STStats * st_stats_dup (const STStats *self)

Deep-copies all metrics into a new object.

self

Source stats.

Returns: Newly allocated STStats.

Function: void st_stats_set_notify_context (STStats *self, GMainContext *context)

Affinity for the coalesced changed signal.

self

Stats object.

context

Affinity context, or NULL for default.

Returns: Nothing.

Function: const gchar * st_stats_get_name (const STStats *self)

Reads the label.

self

Stats object.

Returns: Borrowed name (affinity-thread assumptions apply).

Function: gchar * st_stats_dup_name (const STStats *self)

Thread-safe copy of the label.

self

Stats object.

Returns: Newly allocated name (transfer full).

Function: void st_stats_set_name (STStats *self, const gchar *v)

Updates the label.

self

Stats object.

v

New name.

Returns: Nothing.


Next: STStatsCollector: The Abstract Engine, Up: System Statistics: Performance Monitoring   [Contents]