Trace processor: parse ChromeBenchmarkMetadata proto message
Parse proto generated by telemetry and fill the trace_metadata
table.
Bug: 132682848
Change-Id: Ia8ac1a7fb2472585126510833c31a0b8763491e9
diff --git a/src/trace_processor/trace_storage.h b/src/trace_processor/trace_storage.h
index fc26e66..37bcfe8 100644
--- a/src/trace_processor/trace_storage.h
+++ b/src/trace_processor/trace_storage.h
@@ -762,7 +762,8 @@
// Example usage:
// SetMetadata(metadata::benchmark_name,
// Variadic::String(storage->InternString("foo"));
- void SetMetadata(size_t key, Variadic value) {
+ // Virtual for testing.
+ virtual void SetMetadata(size_t key, Variadic value) {
PERFETTO_DCHECK(key < metadata::kNumKeys);
PERFETTO_DCHECK(metadata::kKeyTypes[key] == metadata::kSingle);
PERFETTO_DCHECK(value.type == metadata::kValueTypes[key]);
@@ -772,7 +773,8 @@
// Example usage:
// AppendMetadata(metadata::benchmark_story_tags,
// Variadic::String(storage->InternString("bar"));
- void AppendMetadata(size_t key, Variadic value) {
+ // Virtual for testing.
+ virtual void AppendMetadata(size_t key, Variadic value) {
PERFETTO_DCHECK(key < metadata::kNumKeys);
PERFETTO_DCHECK(metadata::kKeyTypes[key] == metadata::kMulti);
PERFETTO_DCHECK(value.type == metadata::kValueTypes[key]);