History log of /frameworks/base/cmds/statsd/src/config/ConfigManager.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
52b478b56a156f9c75329b7d25e6bd4583464400 27-Mar-2018 Yao Chen <yaochen@google.com> Update Guardrail.

+ Config count is 10 per uid
+ Update the limit for metrics, matchers, conditions, etc.

Test: statsd_test

Bug: 73122377

Change-Id: I3e1adfe318d1354a7c9d1bf484855661aa3a1fc8
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
4490765d1552f1a2ae114f9c301386823b930828 13-Mar-2018 yro <yro@google.com> Add a check for duplicate configuration on statsd

Bug: 74349901
Test: statsd_test, manual testing of functionality

Change-Id: Ia4e3e51bfe61f5f773cecadda23e53d24b768dc8
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
fdc123b6858b529d3a7661af241a94306816bfa9 10-Feb-2018 David Chen <dwchen@google.com> Adds locks to ConfigManager in statsd.

The ConfigManager can be triggered by Binder threads, so we should
lock any reads or writes to the config managers. We don't need to
lock within StatsService, so those methods simply call the methods
in ConfigManager.

Test: Test that statsd builds and unit tests pass.
Change-Id: I96904c4140a95dc60a419281c8c54f606a443fbc
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
661f791a2580515eee5882ab9498aef94a0d33a5 23-Jan-2018 David Chen <dwchen@google.com> Statsd notifies listener with pendingintent.

Previously, statsd would inform interested listeners that it's time
to collect data via a protected broadcast. However, the preferred
solution is to pass a PendingIntent via a separate setter. Whenever
statsd wants the listener to call getData, StatsCompanionService
will trigger the pending intent.

Test: Tested in marlin-eng that functionality works as expected with
dogfood app.
Bug: 72562867
Change-Id: Ibcfcd5072a1a78947f8a7cbcd0bc429b54351da3
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
469cd8084088bc5d3dcacba657c8796cfcc87d9f 04-Jan-2018 yro <yro@google.com> Use the configs from disk after reboot and separate out ConfigManager
startup for unit test to avoid reading configs for tests

Bug: 70667694
Test: manual testing conducted, statsd, statsd_test
Change-Id: I49cb82d2b1d7c178b7a4c30c089d8d93e7902faa
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
f09569f848ca0b81a21a74e9f4dd8bd9a886151a 14-Dec-2017 Yao Chen <yaochen@google.com> Further reduce statsd memory usage.

+ Remove the protobuf *Metric object from MetricProducers
-- This saves ~150 bytes per metric.
+ Remove the StatsdConfig from ConfigManager
-- This saves us xKB per config.
+ Also remove alerts from fake config to avoid crash (Bug: 70627390)
+ Other misc fixes too.

Test: statsd_test & manual
Change-Id: Ied4eb3fa31c50599817b3a5e1caf5077c487fad2
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
74fed9729fdabff8d2c5a3da89eac26b5aff21d4 27-Nov-2017 yro <yro@google.com> Update adb command to remove all configs from statsd

Before this change we were only clearing configs from disk.
This change will allow clearing from memory as well. Also,
this change fixes a bug where the iterator moves to the next
element before removing the key from mConfigReceivers

Test: statsd, statsd_test

Change-Id: I9f5e0aced9b89bae7b19ae6d8490c076557fbb08
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
947fbce521d9e8377df03e3c1c31884ed5577f32 16-Nov-2017 yro <yro@google.com> Captures metrics on disk when devices reboot and shutdown. Specifically,

1. Create intent receiver in StatsCompanionService to listen to shutdown
events.
2. Create StatsWriter class to handle disk writes and deleting files.
3. Update StatsLogProcessor, ConfigManager, and StatsService to handle
files on disk using StatsWriter.
4. Add a wrapper for ConfigMetricsReport.

Still TODO is to be able to add a guardrail to prevent accumulating
excessive amount files on disk, which will be followed up by another
change.

Test: statsd, statsd_test
Change-Id: Ia0b3af315af545daa8b0078b3700c600aa7c285f
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
74b1513fe69cbf641e2dd84bc37194db80c39480 23-Nov-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Set the metric name for alerts in fake config and add a test to make sure the fake config is valid.."
7c334a129e93e405a72e8299a1cd928af079d14f 22-Nov-2017 Yangster <yanglu@google.com> Make member function as const whenever possible.

Test: unit tests passed.
Change-Id: I751cabf305a4b5aa2095853cc951837da0df4c78
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
756cd48749eb63592b4cf8f6e16f7366debec054 22-Nov-2017 Yangster-mac <yanglu@google.com> Set the metric name for alerts in fake config and add a test to make sure the fake config is valid..

Test: unit test passed.
Change-Id: I1879fc523cca9fc6c672332ab4ac383f21dc16fc
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
1d7b0cd6b54e3b3ec8efdffd47b40cdd54c4e8d7 15-Nov-2017 David Chen <dwchen@google.com> Support StatsD sending broadcasts.

StatsD will send a broadcast when we're 90% of the way to our
allocated memory limit for the configuration. If the memory usage
goes over the limit, we just lose all the data for this config.

Also modifies the adb shell commands to facilitate debugging of the
broadcasts.

Test: Manually tested on marlin-eng with custom gmscore code.

Change-Id: I517a15bd4c959aa221802f84a51f13141a725102
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
87d983cf6f609cf3467d05d92bba30329953fbdb 15-Nov-2017 yro <yro@google.com> Write statsd configuration to disk and add cmd to clear it

Test: statsd, statsd_test
Change-Id: Iba37a7f295256d24969185bdde6cbf28f9b89a55
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
adaf8b344e312853530e276ceff05783133ecf17 03-Nov-2017 David Chen <dwchen@google.com> Adds client API for interacting with statsd.

This API will primarily be used by GmsCore to send updated configs.
Also, sending a config will implicitly notify the StatsD that this
client wants to know when it should request data for this config.

We send a broadcast so that all interested subscribers can know if
data needs to be pulled.

Test: Manually tested that sending broadcast works via new adb
command added in StatsService.

Change-Id: I23cdd1df706036e14b32c3d01af30c3d4af819fa
/frameworks/base/cmds/statsd/src/config/ConfigManager.h
9fc9edf95a308f5884bf541cac81ce1f41aba0ba 16-Oct-2017 Joe Onorato <joeo@google.com> Clean up how we handle configurations, and other assorted cleanup

- 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
/frameworks/base/cmds/statsd/src/config/ConfigManager.h