summaryrefslogtreecommitdiffstats
path: root/infra/it
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2017-05-19 09:30:58 +0200
committerMarek Gradzki <mgradzki@cisco.com>2017-05-19 10:31:58 +0200
commit8166c0a4615ae23694ea7a4a7b050a68e9df9770 (patch)
tree3b00247a58e9e0bedc674db10a02f6d3121326f8 /infra/it
parentbe05d84deebf8bd030bb6564d5cd49094f6da961 (diff)
Remove unnecessary usages of Supplier interface
Change-Id: I6bc2f99806f81c206dcf31711a01fcebe809288a Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra/it')
-rw-r--r--infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/BenchmarkFilesProvider.java4
-rw-r--r--infra/it/memory-benchmark/src/main/java/io/fd/honeycomb/benchmark/memory/MemoryFootprintBenchmark.java2
2 files changed, 3 insertions, 3 deletions
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<Logger> 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();
}