platform_system_core/libstats/socket
Ruchir Rastogi 79dd3eaa87 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: I35dec748ff87c0821d0d06779a406997e6e64966
Merged-In: Ife976bb383ecff8de5064730692a95e2a3a82c9d
2019-12-18 17:44:26 -08:00
..
benchmark Improve stats_event memory usage 2019-12-18 17:44:26 -08:00
include Improve stats_event memory usage 2019-12-18 17:44:26 -08:00
Android.bp Improve stats_event memory usage 2019-12-18 17:44:26 -08:00
stats_buffer_writer.c Create stats_buffer_writer 2019-12-18 15:15:43 -08:00
stats_event.c Improve stats_event memory usage 2019-12-18 17:44:26 -08:00
stats_event_list.c Create stats_buffer_writer 2019-12-18 15:15:43 -08:00
statsd_writer.c
statsd_writer.h