Do not dump metrics if reproxy was never started
Dumping of RBE metrics should only happen when reproxy was started. Reproxy is started only when Soong is run in make / build mode and not in dumpvars mode. Doc: https://docs.google.com/document/d/1Iqhu5QgozB_rA9fucMHO6X4U6A8e8qFtZyub9j83ICQ/edit# Test: Ran a build with / without RBE. No metrics dumped during lunch without RBE and metrics dumping worked as expected with RBE. Bug: b/197213143 Change-Id: Ic3403331e1f4ac2c7c72fd9169aa7b82a7545c75
This commit is contained in:
@@ -221,7 +221,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
defer build.UploadMetrics(buildCtx, config, c.simpleOutput, buildStarted, files...)
|
defer build.UploadMetrics(buildCtx, config, c.simpleOutput, buildStarted, files...)
|
||||||
defer met.Dump(soongMetricsFile)
|
defer met.Dump(soongMetricsFile)
|
||||||
defer build.DumpRBEMetrics(buildCtx, config, rbeMetricsFile)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the time at the starting point.
|
// Read the time at the starting point.
|
||||||
|
@@ -264,6 +264,7 @@ func Build(ctx Context, config Config) {
|
|||||||
|
|
||||||
if config.StartRBE() {
|
if config.StartRBE() {
|
||||||
startRBE(ctx, config)
|
startRBE(ctx, config)
|
||||||
|
defer DumpRBEMetrics(ctx, config, filepath.Join(config.LogsDir(), "rbe_metrics.pb"))
|
||||||
}
|
}
|
||||||
|
|
||||||
if what&RunProductConfig != 0 {
|
if what&RunProductConfig != 0 {
|
||||||
|
Reference in New Issue
Block a user