on master help sign in
Print info messages on stderr instead of stdout

Otherwise it mixes with the output of benchmark list which we use in scripts.

commit3cd8e9bddf3b434a37f68e21247124d00218ad09 authorHarendra Kumar <harendra@composewell.com> dateMon 7 Jun 2021, 19:23 (5 years ago) parentc4358b3
1 file changed+4−4
benchmark/lib/Streamly/Benchmark/Common/Handle.hs+4−4
benchmark/lib/Streamly/Benchmark/Common/Handle.hs+4−4
@@ -38,7 +38,7 @@ import Data.Char (ord, chr)
3838import Data.Word (Word8)
3939import System.Directory (getFileSize)
4040import System.Environment (lookupEnv)
41−import System.IO (openFile, IOMode(..), Handle, hClose)
41+import System.IO (openFile, IOMode(..), Handle, hClose, stderr, hPutStrLn)
4242import System.Process.Typed (shell, runProcess_)
4343
4444import Data.IORef
@@ -187,13 +187,13 @@ mkHandleBenchEnv = do
187187 runProcess_ (shell (cmd inFileBig bigFileSize))
188188 return (inFileSmall, inFileBig)
189189
190− putStrLn $ "Using small input file: " ++ small
190+ hPutStrLn stderr $ "Using small input file: " ++ small
191191 smallHandle <- openFile small ReadMode
192192
193− putStrLn $ "Using big input file: " ++ big
193+ hPutStrLn stderr $ "Using big input file: " ++ big
194194 bigHandle <- openFile big ReadMode
195195
196− putStrLn $ "Using output file: " ++ outfile
196+ hPutStrLn stderr $ "Using output file: " ++ outfile
197197 outHandle <- openFile outfile WriteMode
198198 devNull <- openFile "/dev/null" WriteMode
199199