[swcomp] Flush stdout after printing iteration number

This commit is contained in:
Timofey Solomko
2018-05-02 13:59:35 +03:00
parent c2e2a8c801
commit f2afe8ca16
2 changed files with 2 additions and 1 deletions
@@ -42,6 +42,7 @@ extension BenchmarkCommand {
_ = try benchmarkFunction(fileData)
for i in 1...10 {
print(String(format: "Iteration %02u: ", i), terminator: "")
fflush(__stdoutp)
let startTime = CFAbsoluteTimeGetCurrent()
_ = try benchmarkFunction(fileData)
let timeElapsed = CFAbsoluteTimeGetCurrent() - startTime
+1 -1
View File
@@ -65,7 +65,7 @@ class TarCommand: Command {
case .pax:
print("TAR format: PAX")
}
}
}