Add evaluation object totals at the end

This commit is contained in:
Ben 2022-01-19 21:45:23 +01:00
parent 34f08f4195
commit 049d6c5137
Signed by: ben
GPG key ID: 0F54A7ED232D3319

View file

@ -487,10 +487,12 @@ suspend fun main(args: Array<String>) {
} }
} }
println() println()
println("=== Misses:") println("=== Misses and Totals:")
println(" | ".padStart(rowLabelWidth + 3) + listOf("Misses", "Total").joinToString(" | ") { it.padStart(columnLabelWidth) })
println("-|-".padStart(rowLabelWidth + 3, '-') + listOf("", "").joinToString("-|-") { it.padStart(columnLabelWidth, '-')})
val misses = comparisonData.values.flatten().groupingBy { it.first }.eachCount() val misses = comparisonData.values.flatten().groupingBy { it.first }.eachCount()
for ((missLabel, missCount) in misses.entries) { for ((missLabel, missCount) in misses.entries) {
println(missLabel.padStart(rowLabelWidth) + " | " + missCount) println(missLabel.padStart(rowLabelWidth) + " | " + missCount.toString().padStart(columnLabelWidth) + " | " + totals[missLabel].toString().padStart(columnLabelWidth))
} }
} }
} }