Skip to content

Commit

Permalink
Fix benchmark output format
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1028 committed May 4, 2019
1 parent e15bfd1 commit a7c6606
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Benchmark/Sources/BenchmarkTools.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ struct BenchmarkRunner {

let empty = String(repeating: " ", count: maxLength)
let timeTitle = "Time(second)".padding(toLength: maxLength, withPad: " ", startingAt: 0)
let spacer = ":" + String(repeating: "-", count: maxLength - 1)
let leftAlignSpacer = ":" + String(repeating: "-", count: maxLength - 1)
let rightAlignSpacer = String(repeating: "-", count: maxLength - 1) + ":"

print("#### - From \(sourceCount) elements to \(deleteCount) deleted and \(insertCount) inserted")
print()
print("""
|\(empty)|\(timeTitle)|
|\(spacer)|\(spacer)|
|\(leftAlignSpacer)|\(rightAlignSpacer)|
""")

for benchmark in benchmarks {
Expand Down

0 comments on commit a7c6606

Please sign in to comment.