@@ -48,11 +48,13 @@ Options:
4848 -V, --more-verbose show command output
4949 --debug show debug output for this program
5050 -h, --help show this help
51-
52- Examples:
53- $ quickbench 'sleep 1'
54- $ quickbench -p4 -n100 -N2 -w echo,expr 'echo a' 'echo 3 * 1000000'
55- |] -- if removing [default] annotations, also update pattern matches below
51+ |]
52+ -- CLI help. When changing this, remember to sync:
53+ -- quickbench.cabal
54+ -- README.md
55+ -- quickbench.1.md
56+ -- any Just assumptions below, if changing [default] annotations.
57+ -- Try to avoid writing the same thing different ways in all of these places.
5658
5759defaultFile :: FilePath
5860defaultFile = " bench.sh"
@@ -145,7 +147,7 @@ defaultMain =
145147 hSetBuffering stdout NoBuffering
146148 forM_ [1 .. cycles opts] $ \ cyc -> do
147149 results <- mapM (runTestWithExes opts exes) cmds
148- summarise opts cmds exes cyc results
150+ printSummary opts cmds exes cyc results
149151
150152runTestWithExes :: Opts -> [String ] -> String -> IO [[Float ]]
151153runTestWithExes opts exes cmd = mapM (runTestWithExe opts cmd) exes
@@ -187,8 +189,8 @@ readProcessWithExitCode' exe args inp =
187189 readProcessWithExitCode exe args inp
188190 `catch` \ (e :: IOException ) -> return (ExitFailure 1 , " " , show e)
189191
190- summarise :: Opts -> [String ] -> [String ] -> Int -> [[[Float ]]] -> IO ()
191- summarise opts cmds exes cyc results = do
192+ printSummary :: Opts -> [String ] -> [String ] -> Int -> [[[Float ]]] -> IO ()
193+ printSummary opts cmds exes cyc results = do
192194 out opts $ printf " \n Best times%s:\n " (if cycles opts > 1 then " " ++ show cyc else " " )
193195 let t = maketable opts cmds' exes results
194196 out opts $ TA. render id id id t
0 commit comments