OSDN Git Service

Anomaly detection is per dimension
authorBookatz <bookatz@google.com>
Thu, 4 Jan 2018 19:43:20 +0000 (11:43 -0800)
committerBookatz <bookatz@google.com>
Tue, 9 Jan 2018 19:29:41 +0000 (11:29 -0800)
commit1bf94382d036fa8d61258205c5f4e18cd53cb61d
tree2a376b76bc68439756cc4a0941c819efb4b76971
parent26d5b41fdbb5fe9f42dd33d78ccafd2ea8e38aff
Anomaly detection is per dimension

Anomalies are now detected and declared per dimension. This means that
declareAnomaly now gets access to the key that is responsible for the
anomaly. Moreover, the refractory period is per dimension, not overall.
So a second anomaly for the same metric but a different dimension can
fire within the first dimension's refractory period. Thus, if app A
misbehaves and app B misbehaves shortly thereafter, they will both be
detected.

Eventually this key will be passed to the subscribers, although this cl
doesn't do anything with it.

Test: adb shell data/nativetest64/statsd_test/statsd_test
Change-Id: Id76856dc44fe9ecf91ac81a423e84f97c81d30ab
13 files changed:
cmds/statsd/src/anomaly/AnomalyTracker.cpp
cmds/statsd/src/anomaly/AnomalyTracker.h
cmds/statsd/src/anomaly/DurationAnomalyTracker.cpp
cmds/statsd/src/anomaly/DurationAnomalyTracker.h
cmds/statsd/src/metrics/CountMetricProducer.h
cmds/statsd/src/metrics/duration_helper/DurationTracker.h
cmds/statsd/src/metrics/duration_helper/OringDurationTracker.h
cmds/statsd/tests/anomaly/AnomalyTracker_test.cpp
cmds/statsd/tests/metrics/CountMetricProducer_test.cpp
cmds/statsd/tests/metrics/GaugeMetricProducer_test.cpp
cmds/statsd/tests/metrics/MaxDurationTracker_test.cpp
cmds/statsd/tests/metrics/OringDurationTracker_test.cpp
cmds/statsd/tests/metrics/ValueMetricProducer_test.cpp