1c58f04cd34291584b7bf2b45a54427e0ef650c8 |
|
18-May-2018 |
Yangster-mac <yanglu@google.com> |
Add a field in config to disable/enable the string hashing in metric report. Statsd hashes (using its own hashing function) raw strings to reduce the upload data size when there are duplicate strings in the report. And in cloud, the clearcut translator would backfill the strings. In a few droidfood users, we find the translator was unable to do that. While debugging the root cause, we first decided to provide an option to disable the hashing from the cloud. Test: statsd unit test, CTS test, tested manually BUG: b/79943763 Change-Id: If0359c8cf3f3cf83a2938db9ebf95ea7906f0b0c
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
47234644caf0f2a1aac3a1db8c548b1a25b1cfe2 |
|
14-May-2018 |
Chenjie Yu <cjyu@google.com> |
Configurable data error action in value metric Right now in value metric, if a later pull produces a smaller number than the previous one, we use absolute value of the current value. This is not correct for some atoms as listed in the CL, which should just take 0. For some other atoms, this is unexpected error and should just dump stale data. Test: manual test Bug: 79265262 Change-Id: I59fbfd96cbb57be22cd8d21cb57a7c60ca6856ee
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
50b0c9a6082417034514d68a079248ce09957027 |
|
11-May-2018 |
Yangster-mac <yanglu@google.com> |
Guardrail the max gauge atoms per dimension in one bucket. Test: statsd BUG: b/78603347 Change-Id: Ide77cc8ff0cde6cf6cc9e56034727ed27dd7be88
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
ec3c7a3e58757a23afbb494b5fd9f1a1081fa495 |
|
10-May-2018 |
Yangster <yanglu@google.com> |
Add a sampling method to pull gauge when condition changes to true. Test: statsd test BUG: b/79490890 Change-Id: I82ed6681151f8a217e74bd0d855f817b4fa0619c
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
81245fd53a0bd627fa87e3a69dd667c7d6696ede |
|
12-Apr-2018 |
David Chen <dwchen@google.com> |
Adds option to drop small buckets for statsd. We notice that some of the pulled metrics have a ton of data, and during app upgrades, we're forming partial buckets that represent small periods of time but require many bytes of data. We now have an option to drop these buckets that are too short. Note that we still have to pull the data to keep the metrics for the next bucket correct. We include a new field in the value and gauge metric outputs so that it's easy to tell when a bucket was dropped. We drop the partial buckets also from anomaly detection since we should be computing anomalies from the same data that is reported. Test: Added unit-tests for value and gauge metrics. Bug: 77925710 Change-Id: Ic370496377c6afd380e02278a6c1ed8b521a2731
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
b142cc8add29c8c97f6134d35873d23db666027c |
|
31-Mar-2018 |
Yangster-mac <yanglu@google.com> |
Statsd config TTL Roughly check the config every hour to see whether the ttl expired. If so, read the config from disk and recreate the metric manager. Test: statsd test BUG: b/77274363 Change-Id: I16838afe5bbe966c3a0f638869751f9b59a5a259
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
faa1af535bf6ede5fcab2e0bad5f6c16908916a9 |
|
31-Mar-2018 |
David Chen <dwchen@google.com> |
Includes annotations with statsd reports. It's tricky to determine the source of the metrics on a device currently since we can take the union of multiple configs and send only one giant statsd_config into statsd. We will use the int64 field to track the sub config id's and the int32 field to track the version for each sub config, but the fields are named more generically as annotations. The annotations are available in both the reports and metadata. Test: Check that all unit-tests pass on marlin-eng Bug: 77327261 Change-Id: Ic37c549c8b2991676f69948c515156765c9f5108
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
d50f2ae4875cea32662454090c308bb8c7b622eb |
|
23-Mar-2018 |
Yao Chen <yaochen@google.com> |
rename neq_all_string to neq_any_string in statsd_config Bug: 73897465 Test: statsd_test Change-Id: I1d020de873fc26fbb502f0b3487b85fdb3896753
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
e06cfd777a501eca17f8dd796b32ad61002c5875 |
|
11-Mar-2018 |
Yangster-mac <yanglu@google.com> |
Support slicing by chain. BUG: b/73975181 Test: statsd test Change-Id: I913ae0f68ff21ed0703bb5da9c60d3eaa3bf5981
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
058d86982689071f3d26514f0a3c74d9feddf1d0 |
|
06-Mar-2018 |
Bookatz <bookatz@google.com> |
Statsd BroadcastSubscribers can receive 'cookies' Subscribers can now provide additional Strings that will be passed back to it when an anomaly is detected. This way, the Subscriber can be informed about anomaly-specific information has meaning to it. Statsd itself does not use these strings and doesn't care what they are - it simply passes them back to the subscriber. Change-Id: If269872397c4ed2c67e41d54d850cdc664d4f73e Fixes: 74012329 Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.BroadcastSubscriberTests
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
9b1140eecdf1b7c0ce56289e91d945312eceebea |
|
27-Feb-2018 |
Yao Chen <yaochen@google.com> |
Add the option to match a whitelist of strings in FieldValueMatcher. + This is useful when we want to build Anomaly detection on wakelocks, but want to whitelist wakelocks held by some apps that are whitelisted. It reduces the number of matchers needed in such a config. + Also added the ability to match an AID by string name. Bug: 73897465 Test: unit tests added. Change-Id: I19315ae4d7d27fc467655d3a29866049cd8c9a2b
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
193fe201da5ca4c50ba7df53588acbae521db26c |
|
23-Feb-2018 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Statsd alerts can inform subscribers probabilistically"
|
9c1debe330006b2b4d5c08a55905789c57369609 |
|
19-Feb-2018 |
Yao Chen <yaochen@google.com> |
Add annotation to atoms that represent a state change in atoms.proto + A state change atom can have one exclusive state field, and any number of primary key fields. When there is primary key in the atom, it means the state belongs to the primary key. For example, message UidProcessStateChanged { optional int32 uid = 1 [(stateFieldOption).option = PRIMARY]; optional android.app.ProcessStateEnum state = 2 [(stateFieldOption).option = EXCLUSIVE]; } When there is no primary key fields in the atom, the state is global. For example, message ScreenStateChanged { optional android.view.DisplayStateEnum state = 1 [(stateFieldOption).option = EXCLUSIVE]; } + The annotation is consumed by stats_log_api_gen to generate a static map from the state atoms to its primary fields, and exclusive fields + stats_log.proto is splitted into 2 proto files, because statsd needs proto lite, and c++ lite proto library cannot properly ignore the field options which requires full proto. This CL doesn't change any logic in the statsd yet. A separate CL will use the field option information to correctly track the state. Test: added unit tests in stats_log_api_gen_test. and statsd_test pases. Change-Id: I9e8a979fe81ba60efd4d854bb7087ce4b2b147ec
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
12c1270f8bec36f208daab5c5ca650a8c3130a69 |
|
17-Feb-2018 |
Bookatz <bookatz@google.com> |
Statsd alerts can inform subscribers probabilistically The config can specify that when an alarm fires the relevant subscriber is only informed with some probability. This allows only a fraction of firings to trigger the subscriber's action. Bug: 73287237 Test: none yet Change-Id: I365faad8ffd1b40b01782c1d761b1c0e09c7c299
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
afb36062d5e6d36700147226b5776b4ca8abf922 |
|
01-Feb-2018 |
Yi Jin <jinyithu@google.com> |
Allow statsd_config be able to set destination value AUTO/EXPLICIT. Also move incidentd integration to its own files. clang-format -style=file -i src/anomaly/* and src/subscribers/Incidentd* Bug: 70239380 Test: manual Change-Id: I7bfe14d704d9e86d925365a8a21ffed726723e60
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
b223c4ecae9a101ef820ad71bf89461b5447a34b |
|
02-Feb-2018 |
Bookatz <bookatz@google.com> |
Statsd - adb cmd for AppHook; long compare support 1. Create an adb command for statsd to let the adb user write AppHook to the StatsLog buffer. This can be used in the CTS tests (instead of relying on screen state changes, etc. for conditioning), and for local testing. 2. Fixes the fact that AppHook loggers can spoof uids (they can put whatever uid they want and statsd doesn't validate it - now it will). 3. Allow FieldValueMatcher to compare longs (not just ints). Fix: 72266788 Fix: 72836157 Fix: 72872130 Fix: 72829733 Test: manually did the adb command. Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.alert.AnomalyDetectionTests Test: locally modified android.cts.statsd.alert.BroadcastSubscriberTests#testBroadcastSubscriber to have the app attempt both valid and invalid AppHook writes. Change-Id: I68931a71805bcfa6fe56e7a0a0d3f07290cb78d1
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
34ea1103a0faa0e01df0e2b0ac1ce98e7ec3e3f1 |
|
29-Jan-2018 |
Yangster-mac <yanglu@google.com> |
Extend gauge metric to support memory metric. Test: statd unit test passed. Test: statsd unit test passed Change-Id: I2e3f26563678ae77d44afe168454b6d1ea449f3a
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
b84e8b1fcfb69c058c18b70bbfb76e37cd4e23cd |
|
23-Jan-2018 |
Yangster <yanglu@google.com> |
Sync statsd google3 protos to aosp. Test: statsd unit tests passed Change-Id: I66b05478b7c5b0f9fdd6386b2e2ba7c38a3f9b88
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
e4d44919aa90f16285a9966dcc632c128b932374 |
|
10-Jan-2018 |
Primiano Tucci <primiano@google.com> |
Statsd -> Perfetto integration This CL invokes the perfetto client utility to start the collection of a trace when an anomaly that subscribed to Perfetto is detected. The code simply spawns the /system/bin/perfetto client and passes the trace config via stdin. The client takes care of the dropbox upload. The CollectPerfettoTraceAndUploadToDropbox() function does NOT wait for the full trace collection (in order to avoid blocking statsd) and instead returns immediately after having spawned perfetto. Change-Id: I4f02067bad7a46ede7b6e4841cdcf381c1a4e2a7 Bug: 71795552
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
5e1f854620ecf48febb6ef8ddc3bff856efda7b1 |
|
19-Jan-2018 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Rename the dimension_in_what/condition as fields_in_what/condition in MetricConditionLink proto."
|
6622e942def136eafeeb3978d2fc62648658e285 |
|
19-Jan-2018 |
Yangster-mac <yanglu@google.com> |
Revert the field number change to make statsd_config proto backward-compatible. Test: statsd unit test passed. Change-Id: I28b28c0706d35da3617ec9dba4c5bfeb2527befc
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
2c6dc474acc3087c273cd2501d0769458a769f40 |
|
19-Jan-2018 |
Yangster-mac <yanglu@google.com> |
Rename the dimension_in_what/condition as fields_in_what/condition in MetricConditionLink proto. Test: statsd cts tests passed. Change-Id: I4c21b0da3d153c8d0c368a78647c44699a3161a5
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
468ff04fd4cb43a384a3d4948cccd4438be7202a |
|
17-Jan-2018 |
Yangster-mac <yanglu@google.com> |
Proto change for dimension from condition. Test: all statsd unit tests and cts tests passed. Change-Id: I955143aca7c76e2e22a10d7ba42eb797bd32e147
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
efc331b287e8e227ec4aca7459f04a951f5b81c3 |
|
04-Jan-2018 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Use TimeUnit enum to specify the bucket size."
|
b814481ad1f8d0e429d799b1571a6272e1a7f6c5 |
|
04-Jan-2018 |
Yangster-mac <yanglu@google.com> |
Use TimeUnit enum to specify the bucket size. Test: all statsd unit test passed Change-Id: I4f6b80ba2f8c984b06e46e6de6df3e546e99a968
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
147ce6027880d05286f051f1501100a4ce2b52e8 |
|
22-Dec-2017 |
Yao Chen <yaochen@google.com> |
use only string type in the log source whitelist. + 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
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
a7fb12d2d285a3a62f5e8956d1bacfa0e15e9d0f |
|
04-Jan-2018 |
Yangster-mac <yanglu@google.com> |
1/ Use FieldMatcher to specify the value fields in value metric. 2/ rename number_of_buckets as num_buckets 3/ use double for the Alert's threshold Test: statsd unit tests passed. Change-Id: Id1f55f14d3712eddee561681e3cd77343f086c7a
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
94e197cceb2ba7df13ff8de04f60bfeec64015d9 |
|
03-Jan-2018 |
Yangster-mac <yanglu@google.com> |
1/ Change all "name" to id in statsD. 2/ Handle Subscription for alert. 3/ Support no_report_metric Bug: 69522276 Test: all statsd unit tests passed. Change-Id: I851b235f2d149b8602b0cad632d5bf541962f40a
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
2087716f2bdca90c7c3034d556ac12911bd8018e |
|
23-Dec-2017 |
Yangster-mac <yanglu@google.com> |
1/ Support nested message and repeated fields in statsd. 2/ Filter gauge fields by FieldMatcher. 3/ Wire up wakelock attribution chain. 4/ e2e test: wakelock duration metric with aggregated predicate dimensions. 5/ e2e test: count metric with multiple metric condition links for 2 predicates and 1 non-sliced predicate. Test: statsd unit test passed. Change-Id: I89db31cb068184a54e0a892fad710966d3127bc9
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
d10f7b1c7bdb1c66aa04148945cae9733ee4cadf |
|
18-Dec-2017 |
Yao Chen <yaochen@google.com> |
Add log source filtering in statsd to filter out spams. + 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
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
d9dfda76e0aa8b8aa4d2562a7ff4259f4500e355 |
|
12-Dec-2017 |
Chenjie Yu <cjyu@google.com> |
add feature: GaugeMetricProducer now takes repeated list of fields bug fix: GaugeMetricProducer now works better with pulled events. unit test also includes GaugeMetricProducer_test Test: unit test Change-Id: Ic60f09342d14cfb107be2130d445b323a56909e0
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
a5b5191351a85ea33641dc42ee4223189b3612f3 |
|
06-Dec-2017 |
Stefan Lafon <stlafon@google.com> |
Rename EventConditionLink as MetricConditionLink in statsd_config.proto. Test: Ran statsd_test and cts tests. Change-Id: Ia9a38892854443aa4f17d800a075860fcf874652
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
12d01fa7c165a1f79091d4d742a48bffd7552650 |
|
05-Dec-2017 |
Stefan Lafon <stlafon@google.com> |
Rename more things in statsd_config.proto. SimpleCondition -> SimplePredicate simple_condition -> simple_predicate Condition -> Predicate condition -> predicate Test: Ran statsd and statsd_test. Change-Id: I3115fb51a4dc3cbe5f23535dfc448d5755b9ed7f
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
b8c9aa8c9ccba4e64759c177381b742ca99a5487 |
|
03-Dec-2017 |
Stefan Lafon <stlafon@google.com> |
Rename a few things in statsd_config.proto. This for frameworks/base/ SimpleLogEntryMatcher -> SimpleAtomMatcher. simple_log_entry_matcher -> simple_atom_matcher LogEntryMatcher -> AtomMatcher log_entry_matcher -> atom_matcher Test: Ran statsd_test. Change-Id: I7398758e3fab86235897c162884f5ceab3002510
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
a82d460baf0989c7f2eaf36f7e3669748a1a91fd |
|
21-Nov-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Sync proto from google3"
|
e2cd6d509b17894b95d14523ae3e7c4c7a9a74e3 |
|
10-Nov-2017 |
Yangster-mac <yanglu@google.com> |
1/ Duration anomaly tracker with alarm. 2/ Init anomaly from config based on the public language. 3/ Unit tests for anomaly detection in count/gauge producer. 4/ Revisit the duration tracker logic. Test: unit test passed. Change-Id: I2423c0e0f05b1e37626954de9e749303423963f2
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
cfed20bce8a66bde6ad0d74a44fc0a2764b2886d |
|
18-Nov-2017 |
Stefan Lafon <stlafon@google.com> |
Update statsd_config.proto. Test: Ran statsd tests. Change-Id: I3a83bdfb38be82d70ca547825152370df8bca9cc
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
a81a0ffa52ca31f31589e2a94d3c5ade1c3bd5c2 |
|
16-Nov-2017 |
Yao Chen <yaochen@google.com> |
Sync proto from google3 Default initial value for Condition changed to false Test: statsd_test Change-Id: I73ad80d873f2ff1264d18b1eec6d882ad0e9bb6f
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
5c925ad04ffe959e8fb00253b20daf1f7128b8d6 |
|
15-Nov-2017 |
Yao Chen <yaochen@google.com> |
Sync the DurationMetric proto from google3. There are other statsd_config changes for Anomaly detection, but requires code change. So will sync later. Test: statsd_test Change-Id: I927e99bd0763cb949fe339993b232f53a4eefe7a
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
d1815dc7b82f99259f6c41cfacc44972b867ef2d |
|
14-Nov-2017 |
Yangster-mac <yanglu@google.com> |
Sync statsd to the public proto changes: 1/ use string id/name for all metrics/configs/matchers. 2/ move alerts out of metric proto. Test: unit test passed. Change-Id: I08269f47be30f83f6dbadf873e7d62213449932b
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
967b2051fe17fa3c38d248a556f8c4ff21a573a7 |
|
08-Nov-2017 |
Yao Chen <yaochen@google.com> |
Make SimpleCondition satisfactorily complicated. + Support nested counting + Support StopAll + Added default_condition to SimpleCondition config + Some refactoring/clean up + Added unit tests Test: Added unit tests, statsd_test Change-Id: I6564ac2e068ce6810e8090c0818064c625c7847a
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
3eba62186592382ed3d97cecca0c547487e4b2e4 |
|
26-Oct-2017 |
Yang Lu <yanglu@google.com> |
Update CountAnomalyTracker to handle slicing. Re-added CountAnomalyTracker (under the name DiscreteAnomalyDetector). It is now able to handle dimensions. Test: unit test passed. Change-Id: I133fcf6db99b9e305756f7ee5891c25f0f276348
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
1d4d686001b220e114df737154f143ffabc212f1 |
|
31-Oct-2017 |
Yangster <yanglu@google.com> |
Gauge metric producer. Test: manual tests passed for pushed device temperature. Change-Id: I7592a4c04666606b745cdb41db8f9d8a96a966da
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
53f801163c3df707d846de8875cf92974d5400a8 |
|
01-Nov-2017 |
TreeHugger Robot <treehugger-gerrit@google.com> |
Merge "Adding multi layer aggregation in DurationMetric"
|
5154a379303ab90a2b2914676a4441917a329b5d |
|
31-Oct-2017 |
Yao Chen <yaochen@google.com> |
Adding multi layer aggregation in DurationMetric Newly supported metrics examples: 1) Compute [Total|Max] duration of [an app] holding [ANY] wake lock while [this app] is in [background] and [screen off], bucket size 30seconds, and slice output by uid. 2) Compute [Total|Max] duration of [ANY app] holding [ANY] wake lock while [this app] is in [background] and [screen off], bucket size 30 seconds. + DurationMetric proto has a "what" which is a SimpleCondition. It defines the atom level start and stop of the duration timer, and it has its atom dimension. e.g., for wake locks, the atom dimensions wil be uid and wl name. + Now dimension is explicitly specified in SimpleCondition proto instead of inferred from the "link" + Added support for "Or" and "Max" through 2 layers of aggregation. TODO: (1) The way we track slicedCondition in duration metric is not efficient. optimize! (2) The output dimension should all use int32 instead of KeyMatcher. Fix in a future cl. Test: Added some unit tests using gmock. Will add more unit tests. Change-Id: I58a827624f01f9a54fcb80709c4de4ff94a8bc67
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
d6896898912eb1fc2c8976dce4340ab8d4e8d22f |
|
25-Oct-2017 |
David Chen <dwchen@google.com> |
Updates uidmap to update snapshots and upload. We send a snapshot of all installed apps with their uids every time a user is added or removed and when statsd is started. We keep track of the latest timestamp when a config key has retrieved the UID map data. This allows us to remove older data when we're guaranteed that all config sources have retrieved the old data. Test: Added more unit tests to UidMap_test and passed on marlin-eng. Change-Id: I34a3d61e75eedec44b98d896d7f6db0bc383f46a
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
fa28aec361198e5f9cd8ce1d2aa863b3b3bc5dfc |
|
30-Oct-2017 |
Yangster <yanglu@google.com> |
Sync gauge metric proto to AOSP. Test: manually run all the tests. Change-Id: I81a282c6253d4b4577d8aea31490bb011988435c
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
d3606c79ca58e96a1919292bc139b34351dd272f |
|
19-Oct-2017 |
Bookatz <bookatz@google.com> |
Anomaly detection for count reads from config Count anomaly detection now reads in parameters from the config. Also adds refractory period. Test: Manually, using ConfigManager's fake config Change-Id: I5618c0c6dcd6ef35e14d32315d5ea75ba58f0031
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
729093df0dd7d7038ad43b16ecdb59a1404f3b50 |
|
16-Oct-2017 |
Yao Chen <yaochen@google.com> |
Add support for dimension, and link with condition and added DurationMetric Now we support following metrics: <Duration> of [app holding a wake lock], while [*this app*] is [in background] [AND] [screen is off] [Slice] the output by [app name, wake lock name], with bucket size [30sec] + Also added onDumpReport() api in MetricsManager, it can be called from client to fetch the data from statsd + Also added command line tool to dump the StatsLogReport from all metrics for debugging. + Synced proto from google3. with a pending cl (cr/172359050) TODO: We need to add tons of tests to test the Metrics. I will work on it after this CL so people can be unblocked. I locally test the duration metric with wake lock with an app that generates StatsLog events. Test: statsd_test and manual test, and run: adb shell cmd stats dump-report We have a default config, which contains a metrics to count PROCESS_START event sliced by package name. Change-Id: I4838cc6cf025c143b7e84f43040703a78121fd25
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
caf339d004fad667748b68912c254df4e75cdc5a |
|
07-Oct-2017 |
Yao Chen <yaochen@google.com> |
More complete implementation for condition and log matchers in statsd. + also synced proto from google3 to fix the LogEntryMatcher proto + MetricsManager represents StatsdConfig, it's responsible for initializing and managing all LogEntryMatcher, Condition, and Metrics. Start review from here. + Added more complete StatsdConfig initialization, including building the map for: LogEntryMatcher -> Metrics LogEntryMatcher -> Condition Condition -> Metrics. All the maps use index(int). The extra amount of memory for storing mappings help us quickly process log events. The StatsdConfig initialization process detects malformed config - Circle dependency - Missing definition etc. And once we detect ANY error, statsd will reject the config. And the resources related to this config will be released. Test: Added unit tests Change-Id: I2c4aefdbf3e2aa1701eacbb2fb5e653819ec1fbb
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
cdb1a0ed959818b0c3822e114c0456833769bade |
|
28-Sep-2017 |
Stefan Lafon <stlafon@google.com> |
Check in new protos and constants. Test: Started statsd and verified it outputs data. Also ran statsd tests. Change-Id: I2a438b2ddfcb1576e21acb6159bea607fed7caaa
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
dd89694f5e843963b992a09317aa58fa4a9d7a8d |
|
26-Sep-2017 |
David Chen <dwchen@google.com> |
Adds new utility functions for evaluating log entry matching. Includes matching for both simple and compound matchers. Change-Id: Id913d2625d205ad9a529019e98ae805f730f4d48 Test: Added new unit-tests and checked on marlin device.
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
00698daf3c6c184bb20eb8e9d2c17eb92b567062 |
|
15-Sep-2017 |
yro <yro@google.com> |
Translate Android log entries to stats_log proto Test: tested on local device Change-Id: If9a779a96d31cefaffb1e4424629c14b08e1fc57
/frameworks/base/cmds/statsd/src/statsd_config.proto
|
ab273e2e13f87d57f66395c52df424710b8066e1 |
|
06-Sep-2017 |
Yao Chen <yaochen@google.com> |
Add a DropboxWriter in statsd. + The DropboxWriter keeps data in cache, and flush to files once the size exceeds the maximum value. + Different components should create their owner DropboxWriter with different tags, e.g., anomly detection, experiment metrics, etc. + Copied stats_log related protos from g3 Test: run statsd, and adb shell dumpsys dropbox Will add unit tests. Change-Id: If06e9a9953be32082252b340a97124d732656b40
/frameworks/base/cmds/statsd/src/statsd_config.proto
|