diff options
author | twerth <twerth@google.com> | 2018-07-27 06:11:47 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-27 06:13:25 -0700 |
commit | 2193da931c6804c497f8320dcc81e0d119d26c8c (patch) | |
tree | ab9f07f9684437c25da0dc89a5fc9c74d7f23422 /src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java | |
parent | 0858ae1f6eb890c1e203a2aa21130ba34ca36a27 (diff) |
Add an option to compress the JSON trace profile.
chrome://tracing is able to load gzipped profiles out of the box.
RELNOTES: None
PiperOrigin-RevId: 206308018
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java b/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java index a52bc2e6e7..a4b5424c1a 100644 --- a/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java +++ b/src/test/java/com/google/devtools/build/lib/profiler/ProfilerTest.java @@ -75,14 +75,15 @@ public class ProfilerTest { } } - private ByteArrayOutputStream start(ProfiledTaskKinds kinds, Profiler.Format format) { + private ByteArrayOutputStream start(ProfiledTaskKinds kinds, Profiler.Format format) + throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); profiler.start( kinds, buffer, format, "test", false, BlazeClock.instance(), BlazeClock.nanoTime()); return buffer; } - private void startUnbuffered(ProfiledTaskKinds kinds) { + private void startUnbuffered(ProfiledTaskKinds kinds) throws IOException { profiler.start( kinds, null, null, "test", false, BlazeClock.instance(), BlazeClock.nanoTime()); } |