Skip to content
Snippets Groups Projects
Unverified Commit 33317216 authored by Oleg Grenrus's avatar Oleg Grenrus Committed by GitHub
Browse files

Merge pull request #7125 from phadej/time-per-file-hackage-tests

Tell the time per file in hackage-tests parsec
parents 7e645de7 d47881fc
No related branches found
No related tags found
No related merge requests found
...@@ -341,7 +341,8 @@ main = join (O.execParser opts) ...@@ -341,7 +341,8 @@ main = join (O.execParser opts)
putStrLn $ show n ++ " files processed" putStrLn $ show n ++ " files processed"
putStrLn $ show w ++ " files contained warnings" putStrLn $ show w ++ " files contained warnings"
putStrLn $ show f ++ " files failed to parse" putStrLn $ show f ++ " files failed to parse"
putStrLn $ showFFloat (Just 6) (fromInteger diff / 1e9 :: Double) " seconds elapsed" putStrLn $ showFFloat (Just 6) (fromInteger diff / 1e9 :: Double) " seconds elapsed"
putStrLn $ showFFloat (Just 6) (fromInteger diff / 1e6 / fromIntegral n :: Double) " milliseconds per file"
roundtripP = roundtripA <$> prefixP <*> testFieldsP roundtripP = roundtripA <$> prefixP <*> testFieldsP
roundtripA pfx testFieldsTransform = do roundtripA pfx testFieldsTransform = do
......
...@@ -17,10 +17,12 @@ import qualified Distribution.Types.VersionInterval as New ...@@ -17,10 +17,12 @@ import qualified Distribution.Types.VersionInterval as New
main :: IO () main :: IO ()
main = defaultMain main = defaultMain
[ env (BS.readFile "Cabal/Cabal.cabal") $ \bs -> [ bgroup "parseGPD"
bench "Cabal" $ whnf parseGenericPackageDescriptionMaybe bs [ env (BS.readFile "Cabal/Cabal.cabal") $ \bs ->
, env (BS.readFile "cabal-benchmarks/cabal-benchmarks.cabal") $ \bs -> bench "Cabal" $ whnf parseGenericPackageDescriptionMaybe bs
bench "cabal-benchmarks" $ whnf parseGenericPackageDescriptionMaybe bs , env (BS.readFile "cabal-benchmarks/cabal-benchmarks.cabal") $ \bs ->
bench "cabal-benchmarks" $ whnf parseGenericPackageDescriptionMaybe bs
]
, bgroup "normaliseVersionRange" $ , bgroup "normaliseVersionRange" $
let suite name f = bgroup name let suite name f = bgroup name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment