Add metrics to expconfigfetcher call
Tracks the time to call the expconfigfetcher and whether it updated the
config file or not.
Test:
Ran a build with a "regular" user and verified the metrics indicated
NO_CONFIG and no config file was created.
Ran a build with an "experiment" user and verified the metrics indicated
CONFIG and a googler.json config file was created.
Bug: http://b/227186589
Change-Id: I030e9497c369459ae98c0c4f7765aef6de4c601f
diff --git a/ui/metrics/metrics_proto/metrics.proto b/ui/metrics/metrics_proto/metrics.proto
index 26e4d73..814eb67 100644
--- a/ui/metrics/metrics_proto/metrics.proto
+++ b/ui/metrics/metrics_proto/metrics.proto
@@ -108,6 +108,9 @@
// The metrics for calling Bazel.
repeated PerfInfo bazel_runs = 27;
+
+ // The metrics of the experiment config fetcher
+ optional ExpConfigFetcher exp_config_fetcher = 28;
}
message BuildConfig {
@@ -239,3 +242,22 @@
// Runtime metrics for soong_build execution.
repeated PerfInfo events = 6;
}
+
+message ExpConfigFetcher {
+ enum ConfigStatus {
+ NO_CONFIG = 0;
+ CONFIG = 1;
+ ERROR = 2;
+ }
+ // The result of the call to expconfigfetcher
+ // NO_CONFIG - Not part of experiment
+ // CONFIG - Part of experiment, config copied successfully
+ // ERROR - expconfigfetcher failed
+ optional ConfigStatus status = 1;
+
+ // The output config filename
+ optional string filename = 2;
+
+ // Time, in microseconds, taken by the expconfigfetcher
+ optional uint64 micros = 3;
+}