File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
commonMain/src/kotlinx/benchmark
nativeMain/src/kotlinx/benchmark/native Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ internal object TextBenchmarkReportFormatter : BenchmarkReportFormatter() {
2121
2222 override fun format (results : Collection <ReportBenchmarkResult >): String {
2323 fun columnLength (column : String , selector : (ReportBenchmarkResult ) -> String ): Int =
24- max(column.length, results.maxOf { selector(it).length })
24+ max(column.length, results.maxOfOrNull { selector(it).length } ? : 0 )
2525
2626 val shortNames = denseBenchmarkNames(results.map { it.benchmark.name })
2727 val nameLength = columnLength(" Benchmark" ) { shortNames[it.benchmark.name]!! }
Original file line number Diff line number Diff line change @@ -172,7 +172,8 @@ class NativeExecutor(
172172 }
173173
174174 private fun storeResults (benchmarks : List <BenchmarkDescriptor <Any ?>>, complete : () -> Unit ) {
175- additionalArguments[0 ].readFile().lines().forEach {
175+ val resultsContent = additionalArguments[0 ].readFile()
176+ resultsContent.takeIf (String ::isNotEmpty)?.lines()?.forEach {
176177 val (configFileName, samplesList) = it.split(" : " )
177178 val samples = samplesList.split(" , " ).map { it.toDouble() }.toDoubleArray()
178179 val benchmarkRun = configFileName.parseBenchmarkConfig()
You can’t perform that action at this time.
0 commit comments