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/build/config.go b/ui/build/config.go
index fe74ace..fbe5cd2 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -303,6 +303,12 @@
 		UseRbe:       proto.Bool(config.UseRBE()),
 	}
 	ctx.Metrics.BuildConfig(b)
+
+	s := &smpb.SystemResourceInfo{
+		TotalPhysicalMemory: proto.Uint64(config.TotalRAM()),
+		AvailableCpus:       proto.Int32(int32(runtime.NumCPU())),
+	}
+	ctx.Metrics.SystemResourceInfo(s)
 }
 
 // getConfigArgs processes the command arguments based on the build action and creates a set of new