LogEvent now stores the client's pid (the pid defaults to -1 if it is
not known). This pid will be used internally for permission checks.
This CL also fixes a bug where uids of -1 were being treated incorrectly
as unsigned ints.
Test: bit statsd_test:* (passes when the new socket schema flag is
flipped on).
Change-Id: I8b6b202bb719b79646282764f82466c8065031b3
New parsing logic can be turned on using the DNEW_ENCODING_SCHEME flag.
Currently, we do not support parsing annotations or errors.
To simplify the LogEvent constructor, we remove the creation of
log_msg objects within StatsSocketListener. This change to the LogEvent
constructor also forced us to modify the LogEvent benchmarking code.
Test: m -j128
Test: bit statsd_test:* (passes when flag is off)
Test: atest StatsdHostTestCases (passes when flag is off)
Test: bit statsd_benchmark:*
Change-Id: I827b72f46a617dbc5194ad778fcf7c3d794efb7b
Statsd now sends active configs changed broadcasts when needed per uid.
Also made an adb command to help debug.
More gts tests and unit tests required, will follow.
Test: GTS in topic
Bug: 123372077
Change-Id: Ib079018ded85d002581ffc2ba1240138ce7a54e7
This is to be consistent with other patterns such as UidMap.
This also makes unit test simpler.
Change-Id: I1558cd609e470481f269ecf2ae616277a95cfbf0
Bug: 72722120
Test: unit test
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
Roughly check the config every hour to see whether the ttl expired.
If so, read the config from disk and recreate the metric manager.
Test: statsd test
BUG: b/77274363
Change-Id: I16838afe5bbe966c3a0f638869751f9b59a5a259
changes are:
1) for pushed atoms, use attribution node in place of uid when
appropriate
2) name changes to be more consistent
Bug: 73823969
Test: manual test
Change-Id: Iacf7186dbd7a2282f7fe481f43dbbf92e1165b47
benchmarks how long stats_write takes for boot sequence atom
results: I ran it a few times, and the times ranged from ~18-20us on
marlin
Test: ran the benchmark test
Change-Id: I900ef26ce219301a6d43999fe7be5e4875ae5b8a
+ We should benchmark the core functions in the critical path.
1. LogEvent parsing
2. Log matching
3. Event processing in various metrics
....
+ Using microbenchmark, we can quantify the optimization we do in the future.
---------------------------------------------------------
Benchmark Time CPU Iterations
---------------------------------------------------------
BM_LogEventCreation 4772 ns 4705 ns 145738
Test: make -j64 statsd_benchmark
Bug: 72242322
Change-Id: I43aa704ffdc7cd21e02ef9038eff66ca7022dbfb