OSDN Git Service

Add no more than 20 timestamps for a config in StatsdStats.
authorYao Chen <yaochen@google.com>
Wed, 29 Nov 2017 00:07:02 +0000 (16:07 -0800)
committerYao Chen <yaochen@google.com>
Wed, 29 Nov 2017 00:07:02 +0000 (16:07 -0800)
commit0fac5b17e6ec11461a35859740212daa13d2c5cd
treef1dc87e297b39501c4dc5aba53f2881be7c6c02b
parentd2b6b41095055ee385dc3f63fce6b8b5c0e55e26
Add no more than 20 timestamps for a config in StatsdStats.

To avoid the array to grow unboundedly.

Test: added unit tests.
Change-Id: I3c4823b2a89bb69428d81b9fe348e7ea9aba24c7
cmds/statsd/src/guardrail/StatsdStats.cpp
cmds/statsd/src/guardrail/StatsdStats.h
cmds/statsd/tests/guardrail/StatsdStats_test.cpp