summaryrefslogtreecommitdiff
path: root/cmds/statsd/src/matchers/SimpleLogMatchingTracker.cpp
AgeCommit message (Collapse)Author
2020-08-14Make LogMatchingTracker, SimpleLogMatchingTracker, ↵Salud Lemus
CombinationLogMatchingTracker, LogTracker, and AtomMatcher naming consistent Bug: 163421298 Test: `m statsd` Test: `m statsd_test` Test: `m` Test: `atest statsd_test` Change-Id: I626be9507b64959d3dcb7f260c62229f0f1d0140
2020-08-10Partial Config Update: MatchersTej Singh
There are two primary steps: 1. Determine which matchers to update 2. Perform the update Added unit tests Test: atest statsd_test Bug: 162322018 Change-Id: I6dbaeb781eef362e2d024a560904497a3525cad2
2020-02-01Delete unused imports in StatsdJeffrey Huang
Delete libplatformprotos since its not used. Test: m -j Bug: 147599928 Change-Id: I80203756d714bf123978d26bbe81351a1abdc967
2018-01-031/ Change all "name" to id in statsD.Yangster-mac
2/ Handle Subscription for alert. 3/ Support no_report_metric Bug: 69522276 Test: all statsd unit tests passed. Change-Id: I851b235f2d149b8602b0cad632d5bf541962f40a
2018-01-011/ Support nested message and repeated fields in statsd.Yangster-mac
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
2017-12-04Rename a few things in statsd_config.proto.Stefan Lafon
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
2017-11-27Add StatsdStats and guardrail.Yao Chen
+ StatsdStats is the global class that tracks the stats about statsd. + Added guardrail for classes that have a map which could potentially grow unboundedly with the number of logs. TODO: add unit tests & CTS for StatsdStats, and guardrail add stats for pulled atoms. Test: statsd_test Change-Id: I0ea562de4dd3f6162f7923a9c193420b482c1d51
2017-10-19Add support for dimension, and link with condition and added DurationMetricYao Chen
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
2017-10-18Introduce a new wrapper for log_msg -- LogEventJoe Onorato
It stores all of the parsed fields in a single vector, and provides accessor methods to get at fields by index with their correct type. Test: statsd_test Change-Id: I4fa94e4ce52db3ac87f19b62f9c85398de6e8145
2017-10-18Clean up how we handle configurations, and other assorted cleanupJoe Onorato
- Add a ConfigManager class that tracks the configurations that have been passed to us. Configurations are now tracked by tuples of (uid,tag), where the tag is an app-defined string, in case a single uid has multiple configurations. - Move all of the initialization into StatsService. - Get rid of the ability to have multiple LogListeners. Raw events are now pushed directly into StatsService, which can distribute them to the interested parties (and will eventually be able to do the proper locking). - Add Log.h, which sets our LOG_TAG correctly. - Move some of the related files that I expect will grow some into their own subdirectories. Test: statsd_test Test: adb shell cmd stats config ... Test: adb shell dumpsys stats Change-Id: I79487603003d8a842d5bd319741f1ecbf72063d1
2017-10-10More complete implementation for condition and log matchers in statsd.Yao Chen
+ 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