diff options
author | ccalvarin <ccalvarin@google.com> | 2018-07-26 14:38:51 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-07-26 14:40:16 -0700 |
commit | 7e87730de985b7099b9b683571d58efdaab70890 (patch) | |
tree | 42f4bba0c0f6d99455a68fc6beead8d2edb8fc08 /src/test/java/com/google/devtools/build/lib/profiler/AutoProfilerBenchmark.java | |
parent | 0ccfde8b8bb646166a4f45c8630e8fe174f764f4 (diff) |
Remove default MD5 in most of Bazel's virtual filesystems.
This forces the ex-default to be explicit in a lot of tests, but I'd rather that than have the risk of implicit md5-use in production code.
To keep this CL smaller, do not remove the default from UnixFS quite yet.
RELNOTES: None.
PiperOrigin-RevId: 206223521
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 | 18 |
1 files changed, 10 insertions, 8 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 044ae8c0d4..1022f38d92 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 @@ -17,6 +17,7 @@ import com.google.caliper.BeforeExperiment; import com.google.caliper.Benchmark; import com.google.devtools.build.lib.clock.BlazeClock; import com.google.devtools.build.lib.profiler.Profiler.ProfiledTaskKinds; +import com.google.devtools.build.lib.vfs.DigestHashFunction; import com.google.devtools.build.lib.vfs.inmemoryfs.InMemoryFileSystem; /** @@ -27,14 +28,15 @@ public class AutoProfilerBenchmark { @BeforeExperiment void startProfiler() throws Exception { - Profiler.instance().start( - ProfiledTaskKinds.ALL, - new InMemoryFileSystem().getPath("/out.dat").getOutputStream(), - Profiler.Format.BINARY_BAZEL_FORMAT, - "benchmark", - false, - BlazeClock.instance(), - BlazeClock.instance().nanoTime()); + Profiler.instance() + .start( + ProfiledTaskKinds.ALL, + new InMemoryFileSystem(DigestHashFunction.MD5).getPath("/out.dat").getOutputStream(), + Profiler.Format.BINARY_BAZEL_FORMAT, + "benchmark", + false, + BlazeClock.instance(), + BlazeClock.instance().nanoTime()); } @BeforeExperiment |