Do not truncate AStatsEvent buffers

Pushed atoms do not need to be truncated because only the bytes added to
the buffer are written to the socket. Pulled atoms do not need to be
truncated because within stats_pull_atom_callback.cpp, we only copy the
valid parts of the buffer to the StatsEventParcel object.

This improves performance by avoiding a needless call to realloc.

+ removed dead benchmarking code

Test: m libstatssocket
Test: atest libstatssocket_test
Test: atest GtsStatsdHostTestCases
Bug: 158717786
Change-Id: I6965f8832758203ca566336ba12d0acaf5f756d5
6 files changed
tree: bd096f1f31dff9a7b0b7b7674d42a9a02b249bf0
  1. lib/