Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
efc331b287 Merge "Use TimeUnit enum to specify the bucket size." 2018-01-04 22:53:29 +00:00
Yangster-mac
b814481ad1 Use TimeUnit enum to specify the bucket size.
Test: all statsd unit test passed

Change-Id: I4f6b80ba2f8c984b06e46e6de6df3e546e99a968
2018-01-04 13:01:14 -08:00
Yao Chen
147ce60278 use only string type in the log source whitelist.
+ predefined "AID_X" will be provided as string type to statsd, and we will translate
  to integer uid using the static map.

Test: statsd_test

Change-Id: Ie47d8481e0c456457e6881ebb9cb4ce008e772b8
2018-01-04 09:57:03 -08:00
Yangster-mac
94e197cceb 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
2018-01-03 15:34:00 -08:00
Yangster-mac
2087716f2b 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
2018-01-01 10:01:36 -08:00
Yao Chen
0d7d4d4f30 Modify Loadtest app to be able to exclude certain metric types.
Test: manual
Change-Id: Iba025e4d6cd7c15a231550d382768aa7661ccc86
2017-12-22 09:13:37 -08:00
Yao Chen
d10f7b1c7b Add log source filtering in statsd to filter out spams.
+ Add log source whitelist in StatsdConfig
+ Some changes in UidMap API. Listener needs to be wp instead of sp.
+ Update dogfood app config to have log source
+ Increase the stats service thread pool size to 10 (9+1).

TODO: add unit tests(b/70805664). This unit test takes some time to write.

Test: statsd_test & manual

Change-Id: I129b1cc13db5114db7417580962bd7cc4438519d
2017-12-20 18:45:43 -08:00
TreeHugger Robot
e6abcbed99 Merge "Turn off verbose logging, remove the fake config." 2017-12-17 17:01:36 +00:00
Yao Chen
3c0b95ceb5 Turn off verbose logging, remove the fake config.
Test: statsd_test & manual
Change-Id: I43068c8db006cbbeccacaa9d8426ab4d0394313a
2017-12-16 14:34:20 -08:00
David Chen
0a368b2c39 Adds API for apps to push events to statsd.
This API allows app to construct custom metrics based on labels
chosen by the app developers. Also added some buttons to manually
test this functionality in the dogfood app.

Test: Verified that Android can be built and tested with custom app.
Bug: 69522276
Change-Id: Ifb7abea4c1d62fb435a9cb6f32df12bc2234d82f
2017-12-14 16:19:29 -08:00
Joe Onorato
c9f1a9e3dd Merge "Fix how we build the statsd protos." 2017-12-14 05:33:33 +00:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00
Stefan Lafon
14e076e676 Improvements to loadtest app.
- Support for statsd stats in loadtest app.
- Skeleton for correctness validation.
- New config with pulled atoms in gauge metrics.

Test: Ran statsd.

Change-Id: I0f062d55b8827452cc0421093fc35242dc3afb23
2017-12-11 10:54:22 -08:00
Tej Singh
c542320b4f Copy atoms.proto changes to atoms_copy.proto
Also changed load test app to use enum.ToString instead of big switch
case.

Test: built & ran statsd & cts test. Also built & ran load test app.
Change-Id: I975c75e04100df3c380c2e3a46d3737b81f7e21a
2017-12-07 14:11:23 -08:00
Stefan Lafon
9d25218985 Merge "Track PSS in loadtest." 2017-12-07 20:23:37 +00:00
Stefan Lafon
9709fa26f1 Track PSS in loadtest.
Test: Ran the loadtest. Not changing statsd.

Change-Id: Idc43cba59ec2c9d4213e20b395a083fdda58e8c4
2017-12-07 10:10:48 -08:00
Stefan Lafon
a5b5191351 Rename EventConditionLink as MetricConditionLink in statsd_config.proto.
Test: Ran statsd_test and cts tests.
Change-Id: Ia9a38892854443aa4f17d800a075860fcf874652
2017-12-05 21:51:46 -08:00
Stefan Lafon
12d01fa7c1 Rename more things in statsd_config.proto.
SimpleCondition -> SimplePredicate
simple_condition -> simple_predicate
Condition -> Predicate
condition -> predicate

Test: Ran statsd and statsd_test.

Change-Id: I3115fb51a4dc3cbe5f23535dfc448d5755b9ed7f
2017-12-05 09:20:28 -08:00
Stefan Lafon
b8c9aa8c9c Rename a few things in statsd_config.proto.
This for frameworks/base/

SimpleLogEntryMatcher -> SimpleAtomMatcher.
simple_log_entry_matcher -> simple_atom_matcher
LogEntryMatcher -> AtomMatcher
log_entry_matcher -> atom_matcher

Test: Ran statsd_test.

Change-Id: I7398758e3fab86235897c162884f5ceab3002510
2017-12-04 10:59:23 -08:00
TreeHugger Robot
e1e892d4a0 Merge "Create statsd loadtest app." 2017-12-03 19:47:25 +00:00
Stefan Lafon
bc7a04b88d Create statsd loadtest app.
That app automatically sends a bunch of events to logd.
The frequency is adjustable.

Test: Ran statsd.

Change-Id: I7a88c140e39d22549cc76ef68059d292e85a8a24
2017-12-03 10:12:03 -08:00
Tej Singh
77068c43e7 Modify statsd dogfood app to use toString() of enum
Using this reduces code size and allows us to not have to
make a change whenever atoms.proto changes.

Test: manual, tested app on device

Change-Id: Ieb325a7a7bab7430273340bb9d05974fabbadc0d
2017-11-29 19:33:08 -08:00
yro
947fbce521 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
2017-11-22 18:39:23 -08:00
Yao Chen
1ff4f43258 Statsd test app.
Features:
+ Push baseline config to statsd
+ Have buttons to write events to StatsLog (plug/unplug, screen on/off, wake locks)
+ Dump stats log report, and display it on screen (currently support DurationMetricData display).

Test: manual

Change-Id: Ia58d215d30ed7570c0aa1b0627d3b88f8355d425
2017-11-21 16:22:42 -08:00