816 Commits

Author SHA1 Message Date
Yao Chen
980333c960 Allow stats log printing from userdebug builds too.
Test: manually tested.
Change-Id: Id24153dfa9f1520f5037a7af1d54c90c690f99bc
2018-05-30 09:03:17 -07:00
TreeHugger Robot
bab6908c1f Merge "Statsd: ISOLATED_UID_CHANGED out of batterystats" 2018-05-30 11:36:27 +00:00
Bookatz
3c64886a46 Statsd: ISOLATED_UID_CHANGED out of batterystats
Moves the calls to StatsLog.write for ISOLATED_UID_CHANGED to the
calling functions, rather than batterystatsimpl.

Bug: 80308558
Test: none?
Change-Id: I6fe389c536b2a456907c8a87fae61e9c3434004d
2018-05-25 14:24:52 -07:00
Bookatz
d27ab45ad3 Remove TODO in statsd AnomalyTracker_test
The underlying item the TODO is referencing had already been resolved
so the test line can be properly added, per the TODO.

Change-Id: I5c16e7ea319bd16e37475381def656b38f39d17f
Fixes: 80095149
Test: make statsd_test && adb sync data && adb shell data/nativetest64/statsd_test/statsd_test
2018-05-24 10:35:02 -07:00
Yangster-mac
c038bfeebd Merge "Add a field in config to disable/enable the string hashing in metric report." into pi-dev am: 76cb7fe2f6
am: 02b40158ab

Change-Id: I7445eb13283b007738182e2a5ac4808a87124a11
2018-05-21 12:27:13 -07:00
Yangster-mac
1c58f04cd3 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
2018-05-18 10:39:50 -07:00
Chenjie Yu
cded731bcc Merge "ValueMetric pushed events should check condition" into pi-dev am: 644c94f125
am: dcc56f980a

Change-Id: I96f45a327004da4f476c0cb017e532c28a5b4a6d
2018-05-17 16:01:25 -07:00
Chenjie Yu
021e25307d ValueMetric pushed events should check condition
+ fix unit test flakiness

Bug: 79873404
Change-Id: I15b52a79b18c05603640781e4450e7b62fac24ba
Fix: 79873404
Test: unit test
2018-05-16 14:50:11 -07:00
Andreas Gampe
48f98323ce Statsd: Add perfprofd call
Add the binder call to perfprofd to start profiling.

Bug: 73175642
Test: mmma frameworks/base/cmds/statsd
Change-Id: Iebe457a5fd2f42ed86fbb5cd075bea32965234d1
2018-05-16 09:21:17 -07:00
Andreas Gampe
ca1fb02e0c Statsd: Add perfprofd_config proto
Use a link until the configuration is moved to blueprint, at which
point a filegroup should be used.

Bug: 73175642
Test: mmma frameworks/base/cmds/statsd
Change-Id: If32da8e614a2308f473d0cbd9d8b7ab441905619
2018-05-16 09:21:17 -07:00
David Chen
56bd86bfda Merge "Fixes Value metrics in statsd and app upgrades." into pi-dev am: c9076fac9b
am: fcac66945b

Change-Id: I69ec35986b48e33b61a93dca78b0aa4dff2a9ce8
2018-05-15 19:54:54 -07:00
TreeHugger Robot
c9076fac9b Merge "Fixes Value metrics in statsd and app upgrades." into pi-dev 2018-05-16 02:27:37 +00:00
David Chen
092a5a9b85 Fixes Value metrics in statsd and app upgrades.
Pulled value metrics with conditions had a subtle bug that caused
us to leave the condition on even if it should've been false.

Bug: 79778783
Test: Added unit-test and verified on marlin-eng.
Change-Id: I31f34791118319b3471f7a6ea8a024e2d511cfe7
2018-05-15 17:51:47 -07:00
Chenjie Yu
fc5e3bc1a7 Merge "Configurable data error action in value metric" into pi-dev am: 5ca38cafe8
am: 315211c74b

Change-Id: Iafca516e23b063bab59e751cecbea9ef9e25c1bd
2018-05-14 16:10:18 -07:00
Chenjie Yu
47234644ca 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
2018-05-14 13:50:25 -07:00
Yangster-mac
ef68bf057f Merge "Guardrail the max gauge atoms per dimension in one bucket." into pi-dev am: 67cee97754
am: 2d41c7d382

Change-Id: I59c218fe5048f2d9e828f6f4f621b031cd424acd
2018-05-11 20:23:49 -07:00
TreeHugger Robot
67cee97754 Merge "Guardrail the max gauge atoms per dimension in one bucket." into pi-dev 2018-05-12 03:03:01 +00:00
David Chen
bf0f709aa4 Merge "Fixes statsd reports missing strings and SCS." into pi-dev am: 50a5e71bf3
am: efe26104b3

Change-Id: Ied3e488c357ce30206aa80179a8d204204ff07a4
2018-05-11 20:01:47 -07:00
Yangster-mac
50b0c9a608 Guardrail the max gauge atoms per dimension in one bucket.
Test: statsd
BUG: b/78603347
Change-Id: Ide77cc8ff0cde6cf6cc9e56034727ed27dd7be88
2018-05-11 17:15:44 -07:00
David Chen
56ae0d9a48 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
2018-05-11 17:04:56 -07:00
Yangster-mac
0353819e3e Merge "Fix the gauge metric data size estimation." into pi-dev am: 3b592910c5
am: 018765f4ca

Change-Id: Ie878c5b50a2c11f85283d1108a6af08b071110b6
2018-05-09 20:03:55 -07:00
Yang Lu
9324996312 Merge "Add a sampling method to pull gauge when condition changes to true." into pi-dev am: c2f44a19b2
am: 85d7b2a060

Change-Id: I0ca761b2a13c95c86c604873d80597ba91a3d8bb
2018-05-09 19:59:14 -07:00
TreeHugger Robot
3b592910c5 Merge "Fix the gauge metric data size estimation." into pi-dev 2018-05-10 02:43:20 +00:00
Yang Lu
c2f44a19b2 Merge "Add a sampling method to pull gauge when condition changes to true." into pi-dev 2018-05-10 02:37:49 +00:00
yro
54db2eb0cf Merge "Skip writing metrics to disk if it's entirely composed of no_report_metric" into pi-dev am: 3f57b16deb
am: ef16759cdd

Change-Id: I68f6ff7f259acd0ac43c7e34bf259e35bcc2fd1a
2018-05-09 19:24:10 -07:00
TreeHugger Robot
3f57b16deb Merge "Skip writing metrics to disk if it's entirely composed of no_report_metric" into pi-dev 2018-05-10 02:02:37 +00:00
Yangster-mac
dbaaa54aa1 Merge "Fix the flaky gauge/value e2e test due to cached events." into pi-dev am: a159842161
am: 5ba80b011f

Change-Id: I5765a703cdd641d1d0d054a3b9697e558d133a51
2018-05-09 18:25:32 -07:00
TreeHugger Robot
a159842161 Merge "Fix the flaky gauge/value e2e test due to cached events." into pi-dev 2018-05-10 01:02:10 +00:00
Yangster-mac
b2532daf4d Fix the gauge metric data size estimation.
Test: statsd test
BUG: b/77906846
Change-Id: Ie5ab54771acadde1e825289fe5ec491cc2225458
2018-05-09 23:14:26 +00:00
yro
028091cb15 Skip writing metrics to disk if it's entirely composed of
no_report_metric

Test: unit test, cts
Bug: 79488249
Change-Id: I3e13a6271cc36665a43d0f09d8663e5996224477
2018-05-09 16:03:27 -07:00
Yangster
ec3c7a3e58 Add a sampling method to pull gauge when condition changes to true.
Test: statsd test

BUG: b/79490890
Change-Id: I82ed6681151f8a217e74bd0d855f817b4fa0619c
2018-05-09 16:02:35 -07:00
android-build-team Robot
ef2a0c3c0d Merge "Fix partial bucket unit tests." into pi-dev am: c3d0798455
am: e46d7975b8

Change-Id: I8f0022a85d9a86c71e421654542b9082d2231e0c
2018-05-09 12:12:28 -07:00
android-build-team Robot
c3d0798455 Merge "Fix partial bucket unit tests." into pi-dev 2018-05-09 18:07:24 +00:00
Chenjie Yu
21f0b3abea Merge "fix cts error on x86 simulator" into pi-dev am: 9743fae2d9
am: b0828d55e5

Change-Id: Id25dc7960e984e99328fcbbdc729c29021677e3e
2018-05-08 18:15:01 -07:00
Chenjie Yu
9743fae2d9 Merge "fix cts error on x86 simulator" into pi-dev 2018-05-09 00:53:09 +00:00
android-build-team Robot
3183470221 Merge "Fix statsd returning uidmap with empty reports." into pi-dev am: 0d3a6dee7f
am: 30b2280bbe

Change-Id: I27d74b551c56552542a2f56c64fb8326fabb9a9a
2018-05-08 17:42:52 -07:00
android-build-team Robot
0d3a6dee7f Merge "Fix statsd returning uidmap with empty reports." into pi-dev 2018-05-09 00:25:31 +00:00
android-build-team Robot
1515a28eed Merge "Should not use the absolute value when the value does not change." into pi-dev am: 64307ea578
am: 6a748eee30

Change-Id: I8c3a1f81ef65bc0af8fcb8dbbb832c5cf2b80285
2018-05-08 16:55:17 -07:00
Yangster-mac
58e609e339 Fix the flaky gauge/value e2e test due to cached events.
Test: statsd test
BUG: b/79265262
Change-Id: I4d67f1c2edb6215a3cea23f8c7b2e8d5099c4aac
2018-05-08 16:19:48 -07:00
Chenjie Yu
3b3adcd8b6 fix cts error on x86 simulator
Bug: 78242568
Fix: 78242568

Test: cts test
Change-Id: I235991c7c5b7c5a0d660ebaaff1356cc69fd1854
2018-05-08 15:40:01 -07:00
Yangster
613a7e2a7d Should not use the absolute value when the value does not change.
Test: statsd test

BUG: b/79265262
Change-Id: Ic654e1a07a505ec0e073a41fb41bcd38a29b125e
2018-05-08 15:12:30 -07:00
Yang Lu
88daf748ac Merge "Fixes statsd returning too much data at once." into pi-dev am: cdb093e080
am: 0e4b1c1bee

Change-Id: Ia470a56187612d4607737410f1abfc8ffac17581
2018-05-07 18:51:22 -07:00
David Chen
9e6dbbdadf Fix statsd returning uidmap with empty reports.
We notice devices uploading a bunch of bytes for the uidmap even if
the device is running an empty config, so there are no actual metrics
to report. This hardcodes some logic to skip the inclusion of the
uidmap if there are exactly 0 metrics.

Bug: 79381210
Test: Tested unit-tests on marlin-eng
Change-Id: I96348235341a7faf15ff57d4d1eccac635a3a999
2018-05-07 18:07:19 -07:00
Howard Ro
76e3dbf0bd Merge "Re-enable the logging of APP_BREADCRUMB_REPORTED atom" into pi-dev am: 7ca1b03ece
am: e68a729b08

Change-Id: Ie15622ace2952c7ab30047b7935a1d03bfa31a1c
2018-05-07 17:12:11 -07:00
Yang Lu
cdb093e080 Merge "Fixes statsd returning too much data at once." into pi-dev 2018-05-07 23:49:54 +00:00
Yao Chen
cc884dfc94 Fix partial bucket unit tests.
Bug: 79347749
Test: statsd_test
Change-Id: I69eee7172d6fe4ce895530f089193eb08653e269
2018-05-07 10:34:31 -07:00
yro
be6d7f90e8 Re-enable the logging of APP_BREADCRUMB_REPORTED atom
Bug: 78613419
Test: manual, cts, unit tests
Change-Id: I279158c8031eda3ee648053ae6a0d13fde7f1176
2018-05-06 22:25:05 -07:00
David Chen
48944901f7 Fixes statsd returning too much data at once.
We observe a single ConfigMetricsReportList can be greater than the
safe size for the binder transaction buffer since we only check the
size of the current metrics in progress, but we also return the
previous reports stored on disk.

This change will attempt to send another ConfigMetricsReportList
as soon as possible if there's already a report on disk.

Also fixes a bug when trying to trigger data fetch before the client
has registered the corresponding dataFetchOperation.

Bug: 79201869
Test: Tested manually on marlin-eng
Change-Id: I2d3677162804a27e7a7a95d482d80c46bd994a67
2018-05-04 17:09:16 -07:00
Yao Chen
46ab2531f3 Merge "Add cmd to let statsd print all logs it received for debugging." into pi-dev am: a62ae51ba9
am: 60bb3fe68d

Change-Id: If312f25ecbb27385b9b6ecc4a3e73ee7e90522bc
2018-05-04 13:55:30 -07:00
Yao Chen
a62ae51ba9 Merge "Add cmd to let statsd print all logs it received for debugging." into pi-dev 2018-05-04 20:21:18 +00:00