Collect total number of CPU cores and available RAM for each build.
Collect the total number of CPU cores and available RAM for each build
as part of the system resource info. This is to know what kind of
build machines that the developers are using.
Bug: b/169453825
Test: m nothing and ran printproto on soong_metrics to validate the
data.
Change-Id: I8617bdb9490b37d7689abd27d349af1a651533db
diff --git a/ui/metrics/metrics_proto/metrics.proto b/ui/metrics/metrics_proto/metrics.proto
index 4e8e12b..3586be0 100644
--- a/ui/metrics/metrics_proto/metrics.proto
+++ b/ui/metrics/metrics_proto/metrics.proto
@@ -99,6 +99,9 @@
// The hostname of the machine.
optional string hostname = 24;
+
+ // The system resource information such as total physical memory.
+ optional SystemResourceInfo system_resource_info = 25;
}
message BuildConfig {
@@ -109,6 +112,14 @@
optional bool force_use_goma = 3;
}
+message SystemResourceInfo {
+ // The total physical memory in bytes.
+ optional uint64 total_physical_memory = 1;
+
+ // The total of available cores for building
+ optional int32 available_cpus = 2;
+}
+
message PerfInfo {
// The description for the phase/action/part while the tool running.
optional string desc = 1;