ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
Video chat in your terminal
Loading...
Searching...
No Matches
stats_sampler Struct Reference

This is the handoff point for stats scope. Callers fill observer, observer_context, id, started_ns before passing it on; consumers read the values during the operation and return ownership only where the member contract explicitly says they do. More...

Data Fields

stats_sampler_config_t config
stats_snapshot_t * history
stats_snapshot_t latest
size_t capacity
size_t head
size_t count

Detailed Description

This is the handoff point for stats scope. Callers fill observer, observer_context, id, started_ns before passing it on; consumers read the values during the operation and return ownership only where the member contract explicitly says they do.

For stats sampler, this is the live record that ties config, history, latest, capacity together. The owning code creates it, updates it while work is active, and releases its handles and pointed-to storage before freeing the record.

Definition at line 65 of file lib/stats/stats.c.

Field Documentation

◆ capacity

size_t stats_sampler::capacity

Definition at line 69 of file lib/stats/stats.c.

Referenced by stats_sampler_create(), and stats_sampler_update().

◆ config

stats_sampler_config_t stats_sampler::config

Definition at line 66 of file lib/stats/stats.c.

Referenced by stats_sampler_create(), and stats_sampler_update().

◆ count

size_t stats_sampler::count

Definition at line 71 of file lib/stats/stats.c.

Referenced by stats_sampler_update().

◆ head

size_t stats_sampler::head

Definition at line 70 of file lib/stats/stats.c.

Referenced by stats_sampler_update().

◆ history

stats_snapshot_t* stats_sampler::history

◆ latest

stats_snapshot_t stats_sampler::latest

Definition at line 68 of file lib/stats/stats.c.

Referenced by stats_sampler_update().


The documentation for this struct was generated from the following file: