History log of /frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
56ae0d9a48212c6e886e5887a6f9191f3020af40 12-May-2018 David Chen <dwchen@google.com> Fixes statsd reports missing strings and SCS.

Reports written to disk don't contain the strings used, which will
make this report unusable if there are strings that don't show up
again. We should always include the strings, so this option is
removed entirely.

Also, we hard-coded the wrong number of fields when pulling
ModemActivityInfo. There are actually 10 fields, not 6.

Bug: 79601503
Test: Tested unit-tests pass on marlin-eng.
Change-Id: I6834b096ced77418a9cc2ddd79b08d1c9c447fae
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
9def8e3995b1034d943a0fd22b6e512bfacdab77 17-Apr-2018 Yangster-mac <yanglu@google.com> Reduce statsd log data size.

1. Hash the strings in metric dimensions.
2. Optimize the timestamp encoding in bucket.
Use bucket num for full bucket and millis for
partial bucket.
3. Encode the dimension path per metric and avoid
deduping it across dimensons.

Test: statsd test
Change-Id: I18f69654de85edb21a9c835c73edead756295e05
BUG: b/77813755
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
e36018b2724b5ae40180f956b16c3e276855b99b 17-Apr-2018 Chenjie Yu <cjyu@google.com> add dump report reason to reports

+ also change uidmapping version numbers to int64_t

Bug: 78132855
Change-Id: Iac7ea93e4bf651bd65bd03383e7ab4971af4fc29
Fix: 78132855
Test: gts test
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
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/tests/e2e/WakelockDuration_e2e_test.cpp
e68f3a5811209eeab71976bc583c6075d9a5979a 04-Apr-2018 Yangster-mac <yanglu@google.com> Flush the partial bucket when startd shuts down or config updated.

Test: statsd test

BUG: b/77556036
Change-Id: Ie4a04ace55e07c4529cdff5906ba874f8815f620
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
8faaa01489d81b815e62e4416e78e4b5500b487a 01-Mar-2018 David Chen <dwchen@google.com> Deletes default allowed_log_sources in statsd.

We should fail right away if someone forgets to set this field
instead of setting default values since this may lead to hard to
explain bugs in the future (eg, why isn't systemui logging an atom
to a config).

Bug: 74608359
Test: Verified unit-tests still pass on marlin-eng.
Change-Id: Ibd8a6ccbc5cc8d2dfb8a1577c64bf9b49822a2c3
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
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/tests/e2e/WakelockDuration_e2e_test.cpp
db15052ae2ea34807644e2e97afa908e43ae59fd 15-Feb-2018 Howard Ro <yro@google.com> Merge "Add a guardrail to limit minimum bucket duration to be 5 minutes except when configured through adb command"
330af58f2b8582b855085655fae553cdfaf44e6c 09-Feb-2018 Yangster-mac <yanglu@google.com> Use elapsed realtime instead of times based on wall clock, which can jump around and go backwards.

Test: statsd unit test passed

Change-Id: Ib541df99231e171b3be2a24f75632693e36da90e
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
59cc24dbfda4148c1f5ef4de9c8763caa8672443 14-Feb-2018 yro <yro@google.com> Add a guardrail to limit minimum bucket duration to be 5 minutes except
when configured through adb command

Bug: 73287251
Test: statsd_test
Change-Id: Iee51fedbaabb2c1f534a6edef3c564da88ef658b
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
8a8d16ceea1e5b7a2f8c41e17b5d993035f50f5d 08-Feb-2018 Yao Chen <yaochen@google.com> Statsd CPU optimization.

The key change is to revamp how we parse/store/match a log event, especially how we match repeated
field and attribution nodes, and how we construct dimensions and compare them.

+ We use a integer to encode the field of a log element. And also encode the FieldMatcher into an
integer and a bit mask. The log matching becomes 2 integer operations.

+ Dimension is stored as encoded field and value pair. Checking if 2 dimensions are equal is then
becoming checking if the underlying integers are equal. The integers are stored contiguously
in memory, so it's much faster than previous tree structure.

Start review from FieldValue.h

Test: statsd_test + new unit tests

Bug: 72659059

Change-Id: Iec8daeacdd3f39ab297c10ab9cd7b710a9c42e86
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
27785a8a4a684c831c18f7189a6fa1b98c3573e6 20-Jan-2018 David Chen <dwchen@google.com> Partial buckets on app upgrade and fix duration.

Statsd will create partial buckets in all metrics producers when an
app is upgraded so that we can separate metrics between different
versions of an app. By looking at the uid map changes, we can tell
which app versions belong to a bucket; for metrics that are not
affected by an app version, we can instead join the buckets together.

To simplify the logic, the ends of the full buckets are always
aligned to when the metric producers were created. These boundaries
are computed on the fly by using the bucket number and the metric
producers' start times.

We keep the anomaly trackers to only be given full buckets; we buffer
the partial buckets within each metric producer.

Duration metric's MAX_SPARSE is fixed to be implemented as such. In
addition, after further discussion, we find anomaly detection on
MAX_SPARSE to be unnecessary, so this functionality is removed.

Test: Unit-tests added and modified, passed on marlin-eng.
Change-Id: I5ff7a9c7f05c406e9faf400c6a39162970ded102
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
1a1b0464cb43903ed540f4c43fd423b16e398c04 12-Jan-2018 Bookatz <bookatz@google.com> Statsd and frameworks reference proto enums

For frameworks constants that don't have intrinsic meaning (i.e. their actual
value and order don't matter), so that it is unlikely that their values
will be changed:
This cl introduces proto enums representing some constants found in
the Android codebase, and connects the two.

By using the Proto enum as the source-of-truth, it means that Java and
proto can be kept in sync. Otherwise, when the Java frameworks code
changes, it silently breaks the protos from working properly, since the enums
are wrong. By having the Java code reference the proto enums, it ensures
that everything is in sync. The values of the constants are unchanged.
But future changes to these constants will need to be done in the proto
file, which the Java file merely references.

The protos are necessary for incidentd and statsd and, in the future,
possibly dumpsys. In this way, the logging mechanism is much less likely
to get broken when new constants are added, and we can be ensured that
the logging accurately reflects the underlying codebase.

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases
Change-Id: If79032c34b2799db1e3e70cb47b1312fd72092b9
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
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/tests/e2e/WakelockDuration_e2e_test.cpp
87718e283a62660eaa0e39fd780c97a290da988f 12-Jan-2018 Yangster-mac <yanglu@google.com> Gauge metric e2e test

Test: new test passed
Change-Id: I6a8bceb43fbb6e7b82f47951e71b5620779f2ceb
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
d40053eb8bcb19c7c3b080a36714566bb4e4a748 10-Jan-2018 Yangster-mac <yanglu@google.com> Map isolated uid to host uid when processing log event in statsD.

Test: added test case for isolated uid in Attribution e2e test.
Change-Id: I63d16ebee3e611b1ef0c910e5154cf27766cb330
/frameworks/base/cmds/statsd/tests/e2e/WakelockDuration_e2e_test.cpp
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/tests/e2e/WakelockDuration_e2e_test.cpp
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/tests/e2e/WakelockDuration_e2e_test.cpp
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/tests/e2e/WakelockDuration_e2e_test.cpp