@@ -4,8 +4,9 @@ module Main where
5import Graphics.Vty
5import Graphics.Vty
7−import qualified BenchVerticalScroll
7+import qualified BenchNoDiffOpt
8import qualified BenchRenderChar
8import qualified BenchRenderChar
9+import qualified BenchVerticalScroll
10import Control.Monad
11import Control.Monad
@@ -17,9 +18,10 @@ import System.Posix.Process
19 args <- getArgs
20 args <- getArgs
20− let benches = [ ("vertical-scroll-0", BenchVerticalScroll.main)
21+ let benches = [ ("no-diff-opt-0", BenchNoDiffOpt.bench_0)
21 , ("render-char-0", BenchRenderChar.bench_0)
22 , ("render-char-0", BenchRenderChar.bench_0)
22− , ("render-char-1", BenchRenderChar.bench_1)]
23+ , ("render-char-1", BenchRenderChar.bench_1)
24+ , ("vertical-scroll-0", BenchVerticalScroll.bench_0)]
23 help = forM_ benches $ \(b,_) -> putStrLn $ "--" ++ b
25 help = forM_ benches $ \(b,_) -> putStrLn $ "--" ++ b
24 case args of
26 case args of
25 ["--help"] -> help
27 ["--help"] -> help
@@ -28,7 +30,8 @@ main = do
28 let args' = if args /= []
30 let args' = if args /= []
30 else map fst benches
32 else map fst benches
33+ -- drop the dash-dash "--"
31− results <- forM args' $ \b -> do
34+ results <- forM args' $ \(_ : _ : b) -> do
32 case lookup b benches of
35 case lookup b benches of
33 Just f -> bench b f
36 Just f -> bench b f
34 Nothing -> fail $ "No benchmark named " ++ b
37 Nothing -> fail $ "No benchmark named " ++ b