diff options
author | ulfjack <ulfjack@google.com> | 2018-06-14 01:15:13 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-14 01:16:35 -0700 |
commit | 4a12e07feabc5d9103be20ecb29114f509c5c2f9 (patch) | |
tree | 832b543f7567de7bd297b06a311e1be55eecd68a /src/main/java/com/google/devtools/build/lib/runtime | |
parent | 37c3160ec81623e39b04d46680c5a29b89690ccb (diff) |
Fix Profiler setup to actually enable the Json format
PiperOrigin-RevId: 200518973
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java index cb7dd06472..d4591a46b2 100644 --- a/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java +++ b/src/main/java/com/google/devtools/build/lib/runtime/BlazeRuntime.java @@ -270,7 +270,7 @@ public final class BlazeRuntime { OutputStream out = null; boolean recordFullProfilerData = false; ProfiledTaskKinds profiledTasks = ProfiledTaskKinds.NONE; - + Profiler.Format format = Profiler.Format.BINARY_BAZEL_FORMAT; try { if (options.enableTracer) { Path profilePath = options.profilePath != null @@ -280,6 +280,7 @@ public final class BlazeRuntime { out = profilePath.getOutputStream(); env.getReporter().handle(Event.info("Writing tracer profile to '" + profilePath + "'")); profiledTasks = ProfiledTaskKinds.ALL_FOR_TRACE; + format = Profiler.Format.JSON_TRACE_FILE_FORMAT; } else if (options.profilePath != null) { Path profilePath = env.getWorkspace().getRelative(options.profilePath); @@ -296,7 +297,7 @@ public final class BlazeRuntime { Profiler.instance().start( profiledTasks, out, - Profiler.Format.BINARY_BAZEL_FORMAT, + format, String.format( "%s profile for %s at %s, build ID: %s", getProductName(), |