Skip to content

Commit 8439a6a

Browse files
committed
remove examples from cli help, note other places to change, cleanup
1 parent cb4fae3 commit 8439a6a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/QuickBench.hs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

5759
defaultFile :: FilePath
5860
defaultFile = "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

150152
runTestWithExes :: Opts -> [String] -> String -> IO [[Float]]
151153
runTestWithExes 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 "\nBest 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

Comments
 (0)