[gRPC] Add support for logcat
The gRPC endpoint now supports streaming and pulling logcat data.
The api is similar to the GCE get serialOutput api.
Contains a python example that demonstrates streaming logcat, and
a JavaScript example pulling logcat data.
The addition of this endpoint caused some small changes in how we handle
the LogcatPipe:
- We always enable the logcat pipe. This fixes some weirdness around
logcat and snapshots (See b/132840817 for details).
- We add a RingStreambuf class which acts as a sliding window over an
i/o stream.
- Add some unit tests to validate the Ringbuffer.
- Adds a benchmark to validate performance improvements.
Change-Id: I0b3199ffbbdfbc506fb0b003e87fd60646251cec
Bug: b/132840817
30 files changed