android_system_core/libstats
Ruchir Rastogi f104eb94be Improve stats_event memory usage
We now truncate the buffer to the appropriate length when clients call
stats_event_build().

Benchmarking tests indicate that truncating the buffer to the
appropriate length increases the cost clients pay to write to the socket
by 2%. This is negligible enough that I decided to truncate the buffer
for both pushed and pulled atoms in order to simplify the API.

Test: m libstatssocket
Test: bit libstatssocket_benchmark:*
Bug: 144126231
Change-Id: Ife976bb383ecff8de5064730692a95e2a3a82c9d
2019-12-13 23:38:19 +00:00
..
pull Rename IStatsManager to IStatsd 2019-12-12 11:32:41 -08:00
push_compat StatsEventCompat 2019-12-13 12:03:03 -08:00
socket Improve stats_event memory usage 2019-12-13 23:38:19 +00:00
socket_q Create libstatssocket_q 2019-12-03 14:58:31 -08:00
OWNERS Update OWNERS for libstatssocket 2019-11-01 13:25:31 -07:00