logd: add a SerializedLogBuffer suitable for compression
Initial commit for a SerializedLogBuffer. The intention here is for
the serialized data to be compressed (currently using zlib) to allow
for substantially longer logs in the same memory footprint.
Test: unit tests
Change-Id: I2528e4e1ff1cf3bc91130173a107f371f04d911a
diff --git a/logd/LogBufferTest.h b/logd/LogBufferTest.h
index f91a1b5..235f5ac 100644
--- a/logd/LogBufferTest.h
+++ b/logd/LogBufferTest.h
@@ -26,6 +26,7 @@
#include "LogStatistics.h"
#include "LogTags.h"
#include "LogWhiteBlackList.h"
+#include "SerializedLogBuffer.h"
#include "SimpleLogBuffer.h"
struct LogMessage {
@@ -67,6 +68,8 @@
void SetUp() override {
if (GetParam() == "chatty") {
log_buffer_.reset(new ChattyLogBuffer(&reader_list_, &tags_, &prune_, &stats_));
+ } else if (GetParam() == "serialized") {
+ log_buffer_.reset(new SerializedLogBuffer(&reader_list_, &tags_, &stats_));
} else if (GetParam() == "simple") {
log_buffer_.reset(new SimpleLogBuffer(&reader_list_, &tags_, &stats_));
} else {