Generate build timing metrics to proto format file

Test: Dumped the text formated based metrics file to out dir,
and checked the file.
Bug: b/63815990

Change-Id: Iff476f72a0be74eb53b6b26ef468d11c0f24a404
This commit is contained in:
Nan Zhang
2018-12-12 16:01:49 -08:00
parent a45e15e2d4
commit 17f2767724
18 changed files with 1021 additions and 20 deletions

View File

@@ -23,6 +23,8 @@ import (
"os"
"path/filepath"
"strings"
"android/soong/ui/metrics"
)
// This file provides an interface to the Finder for use in Soong UI
@@ -31,7 +33,7 @@ import (
// NewSourceFinder returns a new Finder configured to search for source files.
// Callers of NewSourceFinder should call <f.Shutdown()> when done
func NewSourceFinder(ctx Context, config Config) (f *finder.Finder) {
ctx.BeginTrace("find modules")
ctx.BeginTrace(metrics.RunSetupTool, "find modules")
defer ctx.EndTrace()
dir, err := os.Getwd()