From 8166c0a4615ae23694ea7a4a7b050a68e9df9770 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Fri, 19 May 2017 09:30:58 +0200 Subject: Remove unnecessary usages of Supplier interface Change-Id: I6bc2f99806f81c206dcf31711a01fcebe809288a Signed-off-by: Marek Gradzki --- .../java/io/fd/honeycomb/benchmark/memory/BenchmarkFilesProvider.java | 4 ++-- .../io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'infra/it') diff --git a/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/BenchmarkFilesProvider.java b/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/BenchmarkFilesProvider.java index c7717d593..ab2705947 100644 --- a/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/BenchmarkFilesProvider.java +++ b/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/BenchmarkFilesProvider.java @@ -33,7 +33,7 @@ public interface BenchmarkFilesProvider { default void outputBenchmarkResult(@Nonnull final MemoryInfo benchmarkResult, @Nonnull final String outputPath, - @Nonnull final Supplier loggerSupplier) { + @Nonnull final Logger logger) { // specifies output file in form specified_name-memory_info_type.csv final Path outPath = Paths.get(outputPath + "-" + benchmarkResult.getMemoryInfoTypeName() + ".csv"); final CSVFormat csvFormat = CSVFormat.RFC4180.withHeader(MemoryInfo.COMMITTED, MemoryInfo.INIT, MemoryInfo.MAX, MemoryInfo.USED); @@ -42,7 +42,7 @@ public interface BenchmarkFilesProvider { // prints values in same order that header is csvPrinter.printRecord(benchmarkResult.getCommitted(), benchmarkResult.getInit(), benchmarkResult.getMax(), benchmarkResult.getUsed()); - loggerSupplier.get().info("Creating output file {}", outPath); + logger.info("Creating output file {}", outPath); // writes output to separate file Files.write(Files.createFile(outPath), Collections.singleton(csvPrinter.getOut().toString())); } catch (IOException e) { diff --git a/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java b/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java index 48d805975..a51819a7c 100644 --- a/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java +++ b/infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java @@ -84,7 +84,7 @@ public class MemoryFootprintBenchmark implements JMXBeanProvider, BenchmarkFiles // query memory beans with JMX and output results on output path queryMemoryBeans(injector.getInstance(JMXServiceURL.class)) - .forEach(memoryInfo -> outputBenchmarkResult(memoryInfo, outputPath, () -> LOG)); + .forEach(memoryInfo -> outputBenchmarkResult(memoryInfo, outputPath, LOG)); // shutdowns server instance injector.getInstance(Server.class).stop(); } -- cgit 1.2.3-korg