1{-# LANGUAGE QuasiQuotes #-}
6import qualified BenchImageFuzz
7import qualified BenchNoDiffOpt
8import qualified BenchRenderChar
9import qualified BenchVerticalScroll
16import System.Environment
17import System.Posix.Process
23 let benches = [ ("no-diff-opt-0", BenchNoDiffOpt.bench0)
24 , ("render-char-0", BenchRenderChar.bench0)
25 , ("render-char-1", BenchRenderChar.bench1)
26 , ("vertical-scroll-0", BenchVerticalScroll.bench0)
27 , ("image-fuzz-0", BenchImageFuzz.bench0) ]
28 help = forM_ benches $ \(b,_) -> putStrLn $ "--" ++ b
33 let args' = if args /= []
34 then map (drop 2) args
36 -- drop the dash-dash "--"
37 results <- forM args' $ \bName -> do
38 case lookup bName benches of
39 Just b -> bench bName b
40 Nothing -> fail $ "No benchmark named " ++ bName
45 putStrLn $ "starting " ++ bName
46 Bench bDataGen bProc <- b
48 startTimes <- bData `deepseq` getProcessTimes
50 endTimes <- getProcessTimes
51 let ut = userTime endTimes - userTime startTimes
52 st = systemTime endTimes - systemTime startTimes
53 putStrLn $ "user time: " ++ show ut
54 putStrLn $ "system time: " ++ show st
55 return (bName, ut, st)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list