Provide Bazel timing breakdown for the mixed builds
Instead of single event in the build metrics
```
| soong_build.mixed_build.bazel | 1:17.1 |
```
it will now show:
```
| soong_build.mixed_build.bazel | 1:17.1 |
| soong_build.mixed_build.bazel.cquery | 51.9 |
| soong_build.mixed_build.bazel.aquery | 23.1 |
| soong_build.mixed_build.bazel.symlinks | 2.1 |
```
Test: treehugger
Change-Id: I84a7dda6e3122860da9aaa98bfa6afe33d392dcf
diff --git a/cmd/soong_build/main.go b/cmd/soong_build/main.go
index 51d2345..bc2d5cb 100644
--- a/cmd/soong_build/main.go
+++ b/cmd/soong_build/main.go
@@ -157,9 +157,7 @@
defer ctx.EventHandler.End("mixed_build")
bazelHook := func() error {
- ctx.EventHandler.Begin("bazel")
- defer ctx.EventHandler.End("bazel")
- return configuration.BazelContext.InvokeBazel(configuration)
+ return configuration.BazelContext.InvokeBazel(configuration, ctx)
}
ctx.SetBeforePrepareBuildActionsHook(bazelHook)
ninjaDeps := bootstrap.RunBlueprint(cmdlineArgs, bootstrap.DoEverything, ctx.Context, configuration)