History log of /frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
15f6bbc24f4d7a3d4481d90a18df33d402ddacba 08-Apr-2018 Yangster-mac <yanglu@google.com> Flush the bucket when creating the metric producer.
Use int64 for value field.
E2e test for gauge/value metric.

BUG: b/74445671

Test: statsd test.
Change-Id: I823a0bade8f89834bdfb9cf48864852a47d7b63b
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
1a0a941c20eb746868d0de52e3806f69c74d335f 28-Mar-2018 Chenjie Yu <cjyu@google.com> Fix StatsCompanionService pull on bucket ends

+ change StatsPullerManager internal time units to be consistent
+ use series of alarms for pullers, instead of use setRepeating

Bug: 76223345
Bug: 75970648
Test: cts test
Change-Id: I9e6ac0ce06541f5ceabd2a8fa444e13d40e36983
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
aa5b2010152c4042786b558a44a89d25229d8962 21-Mar-2018 Chenjie Yu <cjyu@google.com> Fix StatsCompanionService sometimes can be null

Bug: 75970648
Test: will add cts test for puller alarms
Change-Id: I51b7d13f855d3c8ded8325d7cf0f614531eceea5
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
fa22d65f146c94873ba98b768b08c643424c4477 05-Feb-2018 Chenjie Yu <cjyu@google.com> puller cache clearing

+ add adb command to manually clear puller cache
+ try to clear puller cache every 10s

Test: manual test
Change-Id: I8005cacd189de1880fcaeb030efbe21e6d3c0244
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
e72252b6886096eef308164b830fe84dd3c6c01d 01-Feb-2018 Chenjie Yu <cjyu@google.com> Add command to clear puller cache

Test: manual test
Change-Id: Id1fa48b5a6f2200d22f4a746763f65d0c8d65f72
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
85ed8387135849f256cecb4429c75938ad91cd55 15-Dec-2017 Chenjie Yu <cjyu@google.com> align metrics to 5min bundary
We use one alarm clock for all pulled atoms.
If metrics from different configs are not aligned,
the clock will be set to repeat at higher and higher
frequency, and consume a lot of battery.
Current implementation assumes a 5min minimum bucket
size. New metric start time is set to be aligned to
the start time of statsd in the next 5min.
So it will ignore events up to 5min.

align puller alarm to minute bundary

Test: unit test
Change-Id: I77ffa3c13de363c780b1000181b9a9b780dd0846
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
6736c893a73c567d3794d88ae0d17abab34b7a6f 09-Nov-2017 Chenjie Yu <cjyu@google.com> Unit tests for ValueMetricProducer
StatsPullerManager is refactored so that we can mock it.
It may need more refactor pass to make is safer for longer runs.

Test: unit test
Change-Id: Ief0c99710e4d06e1454678f8b749c9599467d114
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
5305e1ddc22bfe9ad941cb2550987aaba8de234c 31-Oct-2017 Chenjie Yu <cjyu@google.com> pull resource power manager stats into statsd

Test: tested on device and check output
Change-Id: I65932a5527d6099e12546b6928a24f3616e54e16
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
b3dda41a5a48ddfa44dc8fa939ab495926a0195d 24-Oct-2017 Chenjie Yu <cjyu@google.com> reretry ValueMetric implementation and pulling mechanism

Note:
This is for value metric. The default operations is sum the diffs.
The test uses kernel wake lock, which also needs dimension by kernel
wake lock name.

The test is a bit cumbersome as it needs StatsCompanionService to do
the alarm, which is not exact alarm.

The internal state of a slice of bucket would look something like this:

4:ipc0000005e_727_android.hardwar
0 0
4:SensorService_wakelock
40 64
4:ipc0000005c_727_android.hardwar
...

Test: manual test on device.
Change-Id: I2ed0ac7d3c5fcba8b7611d46f38a38ffd8bdc92a
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.h
1481fe142d36d5f0b36eeebc358d5a8aef7bf28a 16-Oct-2017 David Chen <dwchen@google.com> Changes pulled data to use Parcel objects.

Previously, pulled data was returned as a string. We instead
return the data as an array of StatsLogEventWrapper, which encodes
using the binary-encoded format liblog uses. StatsD uses the same
parsing as for pushed events to convert these. This CL also fixes
the parsing of log_msg since the strings were previously emptied
before we had a chance to read the values.

Note that the cpp-aidl can't support List of Parcelable, so we
have to return the results as an array.

Test: Manual using the new command in StatsService to print results.
Also created a new unit-test by creating a dummy pull code of -1,
but this test is deleted since it required creating a fake output in
StatsCompanionService.

Change-Id: I1cfb9ea081a59292a60e934e8527adc40982ed80
/frameworks/base/cmds/statsd/src/external/StatsPullerManager.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/external/StatsPullerManager.h