Commit Graph

2609 Commits

Author SHA1 Message Date
TreeHugger Robot
0137f81faf Merge "Update the dimension_in_what/condition field number." 2018-01-19 00:37:42 +00:00
Yao Chen
d03c598b93 Merge "Revert "Enable init.rc for statsd to start statsd by default in boot time"" 2018-01-19 00:27:36 +00:00
Yao Chen
5f3dc878dc Revert "Enable init.rc for statsd to start statsd by default in boot time"
This reverts commit 56967528d7.

Change-Id: I4b76bf5783f0df43603e82168009f33296d1f840
2018-01-19 00:12:18 +00:00
Yangster-mac
16fc72f006 Update the dimension_in_what/condition field number.
Test: statsd unit test passed.

Change-Id: I11aa8a5cfc3bce703cf5ed0d9696d1949df449f0
2018-01-18 14:13:21 -08:00
Yao Chen
67462296b1 Merge "Add StatsdStats in statsd's dumpsys" 2018-01-18 20:09:06 +00:00
Howard Ro
2c41460bc8 Merge "Reinstate configs from disk across boots by fixing bugs" 2018-01-18 19:38:38 +00:00
TreeHugger Robot
14b9335393 Merge "consolidate subsystem sleep state atoms" 2018-01-18 17:56:39 +00:00
Yangster-mac
468ff04fd4 Proto change for dimension from condition.
Test: all statsd unit tests and cts tests passed.

Change-Id: I955143aca7c76e2e22a10d7ba42eb797bd32e147
2018-01-17 21:19:45 -08:00
Yao Chen
f5acabe946 Add StatsdStats in statsd's dumpsys
Bug: 72123656
Test: manual + statsd_test

Change-Id: I8ad9bb3abfa94ee099aa5fc3f28ad9b6fb7340f7
2018-01-17 18:38:09 -08:00
yro
6e304ec690 Reinstate configs from disk across boots by fixing bugs
- Update configName to configID in StorageManager reflecting ag/3410772
- Fix a bug of using strtok destructivelyand correctly parse file name
- Fix a unit test to call StartupForTest of config manager

Bug: 70667694
Test: statsd, statsd_test
Change-Id: If32c02982d1f0c509bdd4e6f445924257bbc074b
2018-01-17 13:44:34 -08:00
TreeHugger Robot
3b9567187e Merge "Update the AID -> UID mapping." 2018-01-17 20:53:35 +00:00
Chenjie Yu
c8b7f2277c consolidate subsystem sleep state atoms
Test: cts test
Change-Id: Ib9ff746eaa17b6c2c8f9fe5860dd0b480ec85186
2018-01-17 11:42:07 -08:00
Yao Chen
29f79b5623 Update the AID -> UID mapping.
Test: statsd_test
Change-Id: I43c004b765b0cc221ec2e02c9979890e5d55d570
2018-01-17 11:00:20 -08:00
TreeHugger Robot
004e782ee5 Merge "Add a statsd proto static lib for cts and others." 2018-01-17 01:31:29 +00:00
Yangster-mac
87718e283a Gauge metric e2e test
Test: new test passed
Change-Id: I6a8bceb43fbb6e7b82f47951e71b5620779f2ceb
2018-01-15 20:41:08 -08:00
yro
079cea9a7e Create /data/misc/stats-data/ and /data/misc/stats-service/ in statsd.rc
rather than during the runtime of statsd

The purpose of this change is to prevent causing selinux violation by
trying to mkdir to /data/misc/ directory when statsd doesn't have
permission to do so.

Bug: 71537285
Test: manually tested to make sure that there's no sepolicy violation

Change-Id: I9c4ccecc416f41923c9b24dd44a388d135fecc07
2018-01-12 13:51:48 -08:00
TreeHugger Robot
964be9ab42 Merge "pull absolute value for cpu time per frequency." 2018-01-12 00:54:34 +00:00
TreeHugger Robot
1ee8514101 Merge "Log attribution to statsd for pushed atoms." 2018-01-11 21:57:40 +00:00
Yao Chen
0f2171041e make statsd run in its own uid
+ Assign permission android.permission.STATSCOMPANION to statsd
+ Fixes in StatsCompanionService to allow statsd to get uid mapping

Test: manual
Change-Id: I3e6ca79eefed7f93a4588578c156321c4c278fd3
2018-01-11 11:58:10 -08:00
TreeHugger Robot
fdb4c48cb2 Merge "Update statsd's user/group from root to system to avoid selinux policy violation" 2018-01-11 18:33:30 +00:00
Yangster-mac
afad8c6b43 Log attribution to statsd for pushed atoms.
Will avoid allocating temp objects in a following CL after the new StatsLog API is in.

Test: all statsd unit test passed.
Change-Id: Id5f6a908d9d42732d83d9985b1b34b29230a7f20
2018-01-11 09:33:13 -08:00
Chenjie Yu
1ee9b7413c pull absolute value for cpu time per frequency.
Test: cts test
Change-Id: I519616905ed8ec6afdaa7e1a0743e279009aa0e5
2018-01-11 09:27:28 -08:00
yro
b19dc2467b Update statsd's user/group from root to system to avoid selinux policy
violation

Bug: 71537285
Bug: 69853944
Test: manual verification to check there's no sepolicy violation

Change-Id: I639cf5c9f4ac6c434c3122c4f42fdf8bdac721f6
2018-01-10 22:26:30 -08:00
TreeHugger Robot
6b00b9a0de Merge "More adjustments to the loadtest app." 2018-01-11 05:44:52 +00:00
Yao Chen
459dee6c51 Add a statsd proto static lib for cts and others.
Test: build
Change-Id: I0119320cba093dc0f758a890ffb9e595b39324ec
2018-01-10 16:47:05 -08:00
TreeHugger Robot
7a2c9d9859 Merge "make incidentd run in its own uid under log group for reading logs." 2018-01-11 00:18:09 +00:00
Yi Jin
30789db28c make incidentd run in its own uid under log group for reading logs.
Test: manual
Change-Id: I7106614c0bed1e862fbc80e42a87b43efc063145
2018-01-10 13:20:14 -08:00
TreeHugger Robot
5d74343545 Merge "Map isolated uid to host uid when processing log event in statsD." 2018-01-10 18:50:55 +00:00
Stefan Lafon
47c186ca32 More adjustments to the loadtest app.
- Add ability to set the replication factor by intent.
- Add shell script to automate the loadtesting.

Test: Loadtest app works.

Change-Id: I7263a3c23049f3ed20144e4e15b6a54ac5fddcc8
2018-01-10 09:27:38 -08:00
Yangster-mac
d40053eb8b 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
2018-01-09 21:45:46 -08:00
Jerry Zhang
8f66b9eb29 Merge "Add setScreenUnlockedFunctions method to UsbManager" 2018-01-10 01:30:03 +00:00
TreeHugger Robot
d6808dc0c0 Merge "E2e test: attribution matching and slicing by attribution." 2018-01-10 00:22:45 +00:00
Jerry Zhang
30b9adfad1 Add setScreenUnlockedFunctions method to UsbManager
The screen unlocked functions save effort on setting
the usb config during each connection. These
functions persist between connections and between
boots. When the screen is unlocked and these
functions are set, the current functions will
be automatically set to the screen unlocked functions.

Also added svc command for this so it can be
used and tested while the UI is worked on.

Bug: 62876645
Test: svc usb setScreenUnlockedFunctions mtp
Test: Test functions with locking, unlocking, and
disconnecting, with no lockscreen, swipe, and pattern

Change-Id: Ia05e095917166d25398c4d310b02971e3a1bb12a
2018-01-09 15:36:35 -08:00
Bookatz
1bf94382d0 Anomaly detection is per dimension
Anomalies are now detected and declared per dimension. This means that
declareAnomaly now gets access to the key that is responsible for the
anomaly. Moreover, the refractory period is per dimension, not overall.
So a second anomaly for the same metric but a different dimension can
fire within the first dimension's refractory period. Thus, if app A
misbehaves and app B misbehaves shortly thereafter, they will both be
detected.

Eventually this key will be passed to the subscribers, although this cl
doesn't do anything with it.

Test: adb shell data/nativetest64/statsd_test/statsd_test
Change-Id: Id76856dc44fe9ecf91ac81a423e84f97c81d30ab
2018-01-09 11:29:41 -08:00
TreeHugger Robot
26d5b41fdb Merge "Cap the size of ice box in StatsdStats." 2018-01-09 17:03:17 +00:00
Olivier Gaillard
aed7f12d4a Add atoms for app startup time.
These atoms match exactly what we currently send through Tron.

Test: manual
Change-Id: I36809417c8d5c62d60035be696ddf506243ee2a9
2018-01-09 14:33:55 +00:00
TreeHugger Robot
c131a9297b Merge changes Ibe8c8d3c,I4a475d6f
* changes:
  Thread-safety at log processor level.
  Handle null string in jni and c++ stats-log-api interfaces.
2018-01-09 10:03:01 +00:00
TreeHugger Robot
c99dea0a4b Merge "Revert "Enable incidentd, it will just be idle while no one triggers it."" 2018-01-09 03:28:11 +00:00
Yi Jin
44ed76eb9f Revert "Enable incidentd, it will just be idle while no one triggers it."
This reverts commit d612df381e.

Reason for revert: Selinux denials, see b/71591707 for more details.

Change-Id: I864cd74e7ba57d67e2ed8328a7df9c5ff335508c
2018-01-09 01:44:47 +00:00
TreeHugger Robot
9761f47e84 Merge "Some fixes in duration metrics" 2018-01-08 23:42:26 +00:00
Yao Chen
f6723dfcf0 Cap the size of ice box in StatsdStats.
+ only keep the last 20 old config stats.

Test: statsd_test
Change-Id: I5bff68299bb9e4def7f7b54aa1d347133bc7a768
2018-01-08 15:18:00 -08:00
Yangster-mac
b0d0628a29 Thread-safety at log processor level.
Test: statsd unit test passed.

Change-Id: Ibe8c8d3cc8297875b16ee385c077b71c87353147
2018-01-08 14:59:42 -08:00
Yi Jin
fbef27ab4a Merge "Implement a new type of section which reads from logd and dumps proto." 2018-01-08 20:52:54 +00:00
Yao Chen
d59a6589fa Some fixes in duration metrics
+ Don't need to keep the condition key if the condition is not sliced.
+ Whiten the hash before returning.

Test: statsd_test
Change-Id: Ie0bcb14b3adc4a15b79ba3be050431a672a68c28
2018-01-08 11:17:11 -08:00
Yangster-mac
b5bc74122f E2e test: attribution matching and slicing by attribution.
Test: statsd unit tests passed.
Change-Id: I05875b80a9a1ab5f87a478d1f63543f9798254a5
2018-01-06 23:23:19 -08:00
Yi Jin
3c034c987e Implement a new type of section which reads from logd and dumps proto.
And implement a file section which reads from event-log-tags for
decoding binary logs.

Bug: 70936599
Test: atest incidentd_test && atest incident_helper_test and flush on
device and test log sections and event_log_tag_map
Change-Id: Ib3d35e317f355de69f01ded012482486e9a43da6
2018-01-06 20:33:14 -08:00
TreeHugger Robot
a7afd1311a Merge "Fix a few things with the loadtest app." 2018-01-06 04:37:59 +00:00
Stefan Lafon
c6f2fa2700 Fix a few things with the loadtest app.
Test: Loadtest app is running fine.

Change-Id: I834f6c618f5a6b0b17ecd5592e2ab2209ce7b94a
2018-01-05 17:02:56 -08:00
Chenjie Yu
b038b70956 pullers now cache data to throttle frequent pull requests.
all pullers have a default 1s cool down before next pull.
We can adjust these later.
Also add puller stats in StatsdStats

Test: unit test
Change-Id: I71894a24c41e059d841591312dbb852f54387b7d
2018-01-05 15:49:59 -08:00
TreeHugger Robot
4735b97d84 Merge "Updates atoms.proto for statsd." 2018-01-05 18:44:54 +00:00