1{-# LANGUAGE QuasiQuotes #-}
2{-# LANGUAGE ScopedTypeVariables #-}
7import qualified BenchImageFuzz
8import qualified BenchNoDiffOpt
9import qualified BenchRenderChar
10import qualified BenchVerticalScroll
17import System.Environment
18import System.Posix.Process
24 let benches = [ ("no-diff-opt-0", BenchNoDiffOpt.bench_0)
25 , ("render-char-0", BenchRenderChar.bench_0)
26 , ("render-char-1", BenchRenderChar.bench_1)
27 , ("vertical-scroll-0", BenchVerticalScroll.bench_0)
28 , ("image-fuzz-0", BenchImageFuzz.bench_0) ]
29 help = forM_ benches $ \(b,_) -> putStrLn $ "--" ++ b
34 let args' = if args /= []
37 -- drop the dash-dash "--"
38 results <- forM args' $ \(_ : _ : b_name) -> do
39 case lookup b_name benches of
40 Just b -> bench b_name b
41 Nothing -> fail $ "No benchmark named " ++ b_name
46 putStrLn $ "starting " ++ b_name
47 Bench b_data_gen b_proc <- b
49 start_times <- b_data `deepseq` getProcessTimes
51 end_times <- getProcessTimes
52 let user_time = userTime end_times - userTime start_times
53 system_time = systemTime end_times - systemTime start_times
54 putStrLn $ "user time: " ++ show user_time
55 putStrLn $ "system time: " ++ show system_time
56 return (b_name, user_time, system_time)
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