CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
MovingAverage.h File Reference

Time-binned moving average / throughput tracker. More...

#include "Stats.h"
#include "PsyTime.h"
Include dependency graph for MovingAverage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cmlabs::StatEntry
 Accumulated samples of one time bin: number of samples and their value sum. More...
class  cmlabs::MovingAverage
 Circular-buffer moving statistics: query average, sum and per-second throughput over recent time windows. More...

Namespaces

namespace  cmlabs

Detailed Description

Time-binned moving average / throughput tracker.

MovingAverage accumulates (value, count) samples into a circular array of fixed-duration time bins (default 600 bins of 100 ms = one minute of history) so recent averages, sums and rates can be queried over arbitrary windows without storing individual samples. Used for message-rate and performance monitoring throughout CMSDK.

Definition in file MovingAverage.h.