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
This commit is contained in:
Patrice Arruda
2020-10-13 23:58:41 +00:00
parent d4620701ad
commit 3edfd48ef4
4 changed files with 163 additions and 78 deletions

View File

@@ -70,6 +70,10 @@ func (m *Metrics) BuildConfig(b *soong_metrics_proto.BuildConfig) {
m.metrics.BuildConfig = b
}
func (m *Metrics) SystemResourceInfo(b *soong_metrics_proto.SystemResourceInfo) {
m.metrics.SystemResourceInfo = b
}
func (m *Metrics) SetMetadataMetrics(metadata map[string]string) {
for k, v := range metadata {
switch k {