Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7a99021a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use EventHandler.Do()"

parents 24a060cf 5c6b9484
Loading
Loading
Loading
Loading
+68 −68
Original line number Diff line number Diff line
@@ -475,7 +475,8 @@ func getExistingBazelRelatedFiles(topDir string) ([]string, error) {
// Bazel BUILD files instead of Ninja files.
func runBp2Build(configuration android.Config, extraNinjaDeps []string) {
	eventHandler := metrics.EventHandler{}
	eventHandler.Begin("bp2build")
	var metrics bp2build.CodegenMetrics
	eventHandler.Do("bp2build", func() {

		// Register an alternate set of singletons and mutators for bazel
		// conversion for Bazel conversion.
@@ -517,7 +518,7 @@ func runBp2Build(configuration android.Config, extraNinjaDeps []string) {
		// Run the code-generation phase to convert BazelTargetModules to BUILD files
		// and print conversion metrics to the user.
		codegenContext := bp2build.NewCodegenContext(configuration, *bp2buildCtx, bp2build.Bp2Build)
	metrics := bp2build.Codegen(codegenContext)
		metrics = bp2build.Codegen(codegenContext)

		generatedRoot := shared.JoinPath(configuration.SoongOutDir(), "bp2build")
		workspaceRoot := shared.JoinPath(configuration.SoongOutDir(), "workspace")
@@ -555,8 +556,7 @@ func runBp2Build(configuration android.Config, extraNinjaDeps []string) {

		// Create an empty bp2build marker file.
		touch(shared.JoinPath(topDir, bp2buildMarker))

	eventHandler.End("bp2build")
	})

	// Only report metrics when in bp2build mode. The metrics aren't relevant
	// for queryview, since that's a total repo-wide conversion and there's a