aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorNan Zhang <nanzhang@google.com>2019-01-07 20:26:51 -0800
committerNan Zhang <nanzhang@google.com>2019-01-07 20:26:51 -0800
commitd50f53bc25ace909eb6e6c7eee918c91324edc26 (patch)
tree319df76eb2e4885ccf4825e61dbcb84130cb416f /cmd
parente2e13a5d9961b023b3ab183d2a729f7ce68eb95b (diff)
downloadbuild_soong-d50f53bc25ace909eb6e6c7eee918c91324edc26.tar.gz
build_soong-d50f53bc25ace909eb6e6c7eee918c91324edc26.tar.bz2
build_soong-d50f53bc25ace909eb6e6c7eee918c91324edc26.zip
Fix the issue for dumping metrics file to artifact
Bug: b/63815990 Test: N/A Change-Id: I72ddc8579626e652a8c27299e009b24ded5312f6
Diffstat (limited to 'cmd')
-rw-r--r--cmd/soong_ui/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/soong_ui/main.go b/cmd/soong_ui/main.go
index 2bd0cf44..03803689 100644
--- a/cmd/soong_ui/main.go
+++ b/cmd/soong_ui/main.go
@@ -104,9 +104,6 @@ func main() {
build.SetupOutDir(buildCtx, config)
- metricsPath := filepath.Join(config.OutDir(), "build_metrics")
- defer met.Dump(metricsPath)
-
logsDir := config.OutDir()
if config.Dist() {
logsDir = filepath.Join(config.DistDir(), "logs")
@@ -118,6 +115,8 @@ func main() {
stat.AddOutput(status.NewVerboseLog(log, filepath.Join(logsDir, "verbose.log")))
stat.AddOutput(status.NewErrorLog(log, filepath.Join(logsDir, "error.log")))
+ defer met.Dump(filepath.Join(logsDir, "build_metrics"))
+
if start, ok := os.LookupEnv("TRACE_BEGIN_SOONG"); ok {
if !strings.HasSuffix(start, "N") {
if start_time, err := strconv.ParseUint(start, 10, 64); err == nil {