trace_processor: add template substitution support for SQL metrics
Also implement the basic process counter metrics to prove the concept.
Context: go/perfetto-metrics
Bug: 129747127
Change-Id: Ia9304328f6368bca085135fac0178243ffc0d9df
diff --git a/src/trace_processor/metrics/BUILD.gn b/src/trace_processor/metrics/BUILD.gn
index 1f0fdbf..2cc26cb 100644
--- a/src/trace_processor/metrics/BUILD.gn
+++ b/src/trace_processor/metrics/BUILD.gn
@@ -17,6 +17,7 @@
sql_files = [
"android/android_mem.sql",
"android/android_mem_lmk.sql",
+ "android/android_mem_proc_counters.sql",
]
config("gen_config") {
@@ -52,3 +53,16 @@
"../../protozero:protozero",
]
}
+
+source_set("unittests") {
+ testonly = true
+ sources = [
+ "metrics_unittest.cc",
+ ]
+ deps = [
+ ":lib",
+ "../../../buildtools:sqlite",
+ "../../../gn:default_deps",
+ "../../../gn:gtest_deps",
+ ]
+}