1{-# LANGUAGE BangPatterns, OverloadedStrings #-}
3import Control.Exception
8import System.Environment (getArgs)
10import qualified Data.ByteString as B
14 let count = read cnt :: Int
15 forM_ args $ \arg -> bracket (openFile arg ReadMode) hClose $ \h -> do
17 start <- getCurrentTime
19 | good+bad >= count = return (good, bad)
21 hSeek h AbsoluteSeek 0
22 let refill = B.hGet h 16384
23 result <- parseWith refill json =<< refill
25 Done _ r -> loop (good+1) bad
26 _ -> loop good (bad+1)
28 delta <- flip diffUTCTime start `fmap` getCurrentTime
29 putStrLn $ " " ++ show good ++ " good, " ++ show delta
30 let rate = fromIntegral count / realToFrac delta :: Double
31 putStrLn $ " " ++ show (round rate) ++ " per second"
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