rather than during the runtime of statsd
The purpose of this change is to prevent causing selinux violation by
trying to mkdir to /data/misc/ directory when statsd doesn't have
permission to do so.
Bug: 71537285
Test: manually tested to make sure that there's no sepolicy violation
Change-Id: I9c4ccecc416f41923c9b24dd44a388d135fecc07
Will avoid allocating temp objects in a following CL after the new StatsLog API is in.
Test: all statsd unit test passed.
Change-Id: Id5f6a908d9d42732d83d9985b1b34b29230a7f20
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
+ Don't need to keep the condition key if the condition is not sliced.
+ Whiten the hash before returning.
Test: statsd_test
Change-Id: Ie0bcb14b3adc4a15b79ba3be050431a672a68c28
all pullers have a default 1s cool down before next pull.
We can adjust these later.
Also add puller stats in StatsdStats
Test: unit test
Change-Id: I71894a24c41e059d841591312dbb852f54387b7d
startup for unit test to avoid reading configs for tests
Bug: 70667694
Test: manual testing conducted, statsd, statsd_test
Change-Id: I49cb82d2b1d7c178b7a4c30c089d8d93e7902faa
+ predefined "AID_X" will be provided as string type to statsd, and we will translate
to integer uid using the static map.
Test: statsd_test
Change-Id: Ie47d8481e0c456457e6881ebb9cb4ce008e772b8
2/ rename number_of_buckets as num_buckets
3/ use double for the Alert's threshold
Test: statsd unit tests passed.
Change-Id: Id1f55f14d3712eddee561681e3cd77343f086c7a
Updates numbering for pulled atoms to start at 10,000 so we have more
room to add more pushed atoms. Also fixes definition for dropbox
error added to more efficiently encode -1, and include the package
name when it's available.
Test: Tested the dropbox atom is logged without crashing on marlin.
Change-Id: I096911e3fe134320f2b1c6f545b0f479c7199612
2/ Handle Subscription for alert.
3/ Support no_report_metric
Bug: 69522276
Test: all statsd unit tests passed.
Change-Id: I851b235f2d149b8602b0cad632d5bf541962f40a
We check that both the developer-chosen label and the state fields
are within the expected ranges.
Test: Test that statsd still builds.
Change-Id: I9f76dfbf16edc4540b28a778385f416cb1306d4e
AddConfiguration now returns false if the incoming byte array can't
even be parsed into the expected proto format. Unfortunately, we
can't fully evaluate if this configuration is valid. Still, this
gives the caller a chance to know that the parameters it sent can't
even be parsed.
Test: Tested that statsd still builds.
Change-Id: I7ba7c64adc4bc77549d5e9133e212a4870645786
Splits out DurationAnomalyTracker-specific functions into their own
subclass.
Test: the unit tests and CTS tests
Change-Id: Id6eb74d232b4a9c3a932d805d1ba3f0ba43a88b1
+ Add a real HashableDimensionKey as a wrapper of the dimension.
So we can get rid of the maps that we kept.
Pay down technical debt and reduce memory usage.
Test: statsd_test & manual
Change-Id: I233280cf1e2ce93da6a8cd4e8514abb066f4016d
+ Add log source whitelist in StatsdConfig
+ Some changes in UidMap API. Listener needs to be wp instead of sp.
+ Update dogfood app config to have log source
+ Increase the stats service thread pool size to 10 (9+1).
TODO: add unit tests(b/70805664). This unit test takes some time to write.
Test: statsd_test & manual
Change-Id: I129b1cc13db5114db7417580962bd7cc4438519d
Creates an atom to represent when statsd's anomaly detection alert
fires, so that statsd can log when it detects an anomaly (in the output
and for any further processing).
Test: manually confirmed that atom was logged
Change-Id: I3376e4038bdc3402a536aab7cebad24b104a9aee
of the next 5 min start. Also refactor config check condition
to be more readable.
Test: unit test
Change-Id: Iaa6b4a59d27c52996723862d92080d90c9e794cb