Add re_analysis environment varibles fields to soong_metrics

Test: Tested by following steps
1.m nothing: field is empty
2.USE_RBE=false m nothing: field log cc_wrapper and rbe_wrapper
3.USE_RBE=false m nothing: field is empty
Bug: 281922291

Change-Id: I1bbb324752b9a2dea1ff2c9df5817559d4cec3a6
This commit is contained in:
Jason Wu
2023-05-30 19:45:36 -04:00
parent 5324cc84ad
commit 2520f5e36b
5 changed files with 245 additions and 208 deletions

View File

@@ -248,6 +248,13 @@ func (m *Metrics) SetBuildCommand(cmd []string) {
m.metrics.BuildCommand = proto.String(strings.Join(cmd, " "))
}
// AddChangedEnvironmentVariable adds the changed environment variable to
// ChangedEnvironmentVariable field.
func (m *Metrics) AddChangedEnvironmentVariable(ChangedEnvironmentVariable string) {
m.metrics.ChangedEnvironmentVariable = append(m.metrics.ChangedEnvironmentVariable,
ChangedEnvironmentVariable)
}
// Dump exports the collected metrics from the executed build to the file at
// out path.
func (m *Metrics) Dump(out string) error {