diff options
author | ulfjack <ulfjack@google.com> | 2018-06-11 09:46:50 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-11 09:48:24 -0700 |
commit | 15b8c259db111012b4642287172cb4d1d82151f3 (patch) | |
tree | 0d46f77b5b25bfd67440c102de54c7de5ff05add /src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java | |
parent | 6841a748109250f65448627bc5695d537990b686 (diff) |
Refactor profiler
- move the save method to an inner class
- don't use a timer, use a blocking queue instead
- add a format enum (in anticipation of adding a json output format)
- update the test to use an in memory buffer, and avoid FoundationTestCase
PiperOrigin-RevId: 200065404
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java b/src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java index c3d9bbe598..044ae8c0d4 100644 --- a/src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java +++ b/src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java @@ -27,9 +27,14 @@ public class AutoProfilerBenchmark { @BeforeExperiment void startProfiler() throws Exception { - Profiler.instance().start(ProfiledTaskKinds.ALL, - new InMemoryFileSystem().getPath("/out.dat").getOutputStream(), "benchmark", false, - BlazeClock.instance(), BlazeClock.instance().nanoTime()); + Profiler.instance().start( + ProfiledTaskKinds.ALL, + new InMemoryFileSystem().getPath("/out.dat").getOutputStream(), + Profiler.Format.BINARY_BAZEL_FORMAT, + "benchmark", + false, + BlazeClock.instance(), + BlazeClock.instance().nanoTime()); } @BeforeExperiment |