diff options
author | antirez <antirez@gmail.com> | 2014-07-07 14:59:57 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-07-07 15:00:01 +0200 |
commit | 19853db892aa10a8b00a561b7dc1d48f7176ee38 (patch) | |
tree | e844611d1f59c4429baa640766b301492a17c244 /src/latency.h | |
parent | b2604dc58c69f357a66df54067eec33a4f262cc9 (diff) | |
download | redis-19853db892aa10a8b00a561b7dc1d48f7176ee38.tar.gz |
Latency: low level time series analysis implemented.
Diffstat (limited to 'src/latency.h')
-rw-r--r-- | src/latency.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/latency.h b/src/latency.h index 1d21d5182..f28fce375 100644 --- a/src/latency.h +++ b/src/latency.h @@ -50,6 +50,16 @@ struct latencyTimeSeries { struct latencySample samples[LATENCY_TS_LEN]; /* Latest history. */ }; +/* Latency statistics structure. */ +struct latencyStats { + uint32_t all_time_high; /* Absolute max observed since latest reset. */ + uint32_t avg; /* Average of current samples. */ + uint32_t min; /* Min of current samples. */ + uint32_t max; /* Max of current samples. */ + uint32_t mad; /* Mean absolute deviation. */ + uint32_t samples; /* Number of non-zero samples. */ +}; + void latencyMonitorInit(void); void latencyAddSample(char *event, mstime_t latency); |