1{-# LANGUAGE BangPatterns #-}
2{-# LANGUAGE NoImplicitPrelude #-}
3{-# LANGUAGE OverloadedStrings #-}
5module Main (main) where
11import Data.Attoparsec.ByteString (IResult(..), parseWith)
13import System.Environment (getArgs)
15import qualified Data.ByteString as B
19 (bs:cnt:args) <- getArgs
20 let count = read cnt :: Int
22 forM_ args $ \arg -> withFile arg ReadMode $ \h -> do
24 start <- getCurrentTime
26 | good+bad >= count = return (good, bad)
28 hSeek h AbsoluteSeek 0
29 let refill = B.hGet h blkSize
30 result <- parseWith refill json =<< refill
32 Done _ _ -> loop (good+1) bad
33 _ -> loop good (bad+1)
35 delta <- flip diffUTCTime start `fmap` getCurrentTime
36 putStrLn $ " " ++ show good ++ " good, " ++ show delta
37 let rate = fromIntegral count / realToFrac delta :: Double
38 putStrLn $ " " ++ show (round rate :: Int) ++ " 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