From 69fe61b2f10f2e5d2e094d467a8845e7ae20aef8 Mon Sep 17 00:00:00 2001 From: Ranjeet Kumar Ranjan Date: Mon, 27 Mar 2023 14:14:06 +0530 Subject: [PATCH] Fix LineBuffering --- lib/BenchRunner.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/BenchRunner.hs b/lib/BenchRunner.hs index fb03770..0248a53 100644 --- a/lib/BenchRunner.hs +++ b/lib/BenchRunner.hs @@ -23,6 +23,7 @@ import Data.List (isSuffixOf) import Data.Map (Map) import System.Directory (createDirectoryIfMissing) import System.FilePath (takeFileName, takeDirectory, ()) +import System.IO (BufferMode(LineBuffering), hSetBuffering, stderr, stdout) import Streamly.Internal.Unicode.String (str) import Streamly.System.Process (ProcessFailure(..)) @@ -544,6 +545,8 @@ mainWith :: -- XXX Use a defaultConfig record instead mainWith targetMap speedOpts rtsOpts = do + hSetBuffering stdout LineBuffering + hSetBuffering stderr LineBuffering (conf, ()) <- simpleOptions "0.0.0"