From f2afe8ca16c2797808e4ad4f7a55f273d45cb2ea Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Wed, 2 May 2018 13:59:35 +0300 Subject: [PATCH] [swcomp] Flush stdout after printing iteration number --- Sources/swcomp/Benchmarks/BenchmarkCommand.swift | 1 + Sources/swcomp/Containers/TarCommand.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/swcomp/Benchmarks/BenchmarkCommand.swift b/Sources/swcomp/Benchmarks/BenchmarkCommand.swift index b9ce1170..cdb100a7 100644 --- a/Sources/swcomp/Benchmarks/BenchmarkCommand.swift +++ b/Sources/swcomp/Benchmarks/BenchmarkCommand.swift @@ -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 diff --git a/Sources/swcomp/Containers/TarCommand.swift b/Sources/swcomp/Containers/TarCommand.swift index 5f7c6e1f..b683cab3 100644 --- a/Sources/swcomp/Containers/TarCommand.swift +++ b/Sources/swcomp/Containers/TarCommand.swift @@ -65,7 +65,7 @@ class TarCommand: Command { case .pax: print("TAR format: PAX") } - + } }