Commit 059d2e80 authored by Noric Couderc's avatar Noric Couderc
Browse files

Implemented printing from Streams

This is better because you don't need to allocate ALL the benchmarks
before benchmarking them!
parent eb7596b9
...@@ -30,6 +30,10 @@ abstract class SyntheticBenchmarkDataPrinter(out : Writer, ...@@ -30,6 +30,10 @@ abstract class SyntheticBenchmarkDataPrinter(out : Writer,
} }
open fun printToCSV(syntheticBenchmarks: List<BCBenchmarkPackage<*>>) { open fun printToCSV(syntheticBenchmarks: List<BCBenchmarkPackage<*>>) {
printStreamToCSV(syntheticBenchmarks.stream())
}
open fun printStreamToCSV(syntheticBenchmarks: Stream<BCBenchmarkPackage<*>>) {
printHeader(); printHeader();
for (syntheticBenchmark in syntheticBenchmarks) { for (syntheticBenchmark in syntheticBenchmarks) {
......
...@@ -112,7 +112,7 @@ class PapiCommandLine : CliktCommand() { ...@@ -112,7 +112,7 @@ class PapiCommandLine : CliktCommand() {
else -> null else -> null
} }
printer!!.printToCSV(benchmarks!!.collect(Collectors.toList())) printer!!.printStreamToCSV(benchmarks!!)
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment