use of com.mongodb.benchmark.framework.BenchmarkResultWriter in project mongo-java-driver by mongodb.
the class BenchmarkSuite method runBenchmark.
private static void runBenchmark(final Benchmark benchmark) throws Exception {
long startTime = System.currentTimeMillis();
BenchmarkResult benchmarkResult = new BenchmarkRunner(benchmark, NUM_WARMUP_ITERATIONS, NUM_ITERATIONS, MIN_TIME_SECONDS, MAX_TIME_SECONDS).run();
long endTime = System.currentTimeMillis();
System.out.println(benchmarkResult.getName() + ": " + (endTime - startTime) / 1000.0);
for (BenchmarkResultWriter writer : WRITERS) {
writer.write(benchmarkResult);
}
}
Aggregations