Add multi-node log file reading
This handles timestamps, sorting, and merging with data.
For simplicity, we read the log files once per node. Once benchmarks
show if this is a bad idea, we can fix it.
Change-Id: I445ac5bfc7186bda25cc899602ac8d95a4cb946d
diff --git a/aos/flatbuffers.h b/aos/flatbuffers.h
index d9fcab6..e556c0f 100644
--- a/aos/flatbuffers.h
+++ b/aos/flatbuffers.h
@@ -4,6 +4,7 @@
#include <array>
#include <string_view>
+#include "absl/types/span.h"
#include "flatbuffers/flatbuffers.h"
#include "glog/logging.h"
@@ -106,6 +107,11 @@
virtual const uint8_t *data() const = 0;
virtual uint8_t *data() = 0;
virtual size_t size() const = 0;
+
+ absl::Span<uint8_t> span() { return absl::Span<uint8_t>(data(), size()); }
+ absl::Span<const uint8_t> span() const {
+ return absl::Span<const uint8_t>(data(), size());
+ }
};
// String backed flatbuffer.