|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
Zero-heap sample aggregation (PROTOCORE_ENABLE_TELEMETRY): a moving window, a rate, a totalizer. More...
#include "protocore_config.h"Go to the source code of this file.
Zero-heap sample aggregation (PROTOCORE_ENABLE_TELEMETRY): a moving window, a rate, a totalizer.
No external specification governs this module. The three accumulators are ordinary descriptive statistics and numeric integration over caller-owned records, and every name here is this library's own.
cap samples. The mean and the variance come off running sums, so a push and either read are each a fixed number of operations; the minimum and the maximum scan the samples held.The caller owns every byte: the window's sample array is a float array it passes in, and the three accumulator records are its own. Nothing here allocates, and the module keeps no file-scope state.
Elapsed time is the unsigned difference of a monotonic millisecond count, so a counter rollover subtracts correctly.
The module exports one symbol, Telemetry. Everything in telemetry.c has internal linkage.
Definition in file telemetry.h.