git.iko.soy/typeable/pandoc
on master help sign in
Updated benchmark program.
commit70ebccf93b415ba804efdfbff3694d3d33875613 authorJohn MacFarlane <jgm@berkeley.edu> dateFri 9 Oct 2015, 16:01 (11 years ago) parent3687dc3
2 files changed+4−7
benchmark/benchmark-pandoc.hs+3−6 pandoc.cabal+1−1
benchmark/benchmark-pandoc.hs+3−6
@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1818import Text.Pandoc
1919import Criterion.Main
2020import Criterion.Monad
21−import System.Environment (getArgs)
21+import Criterion.Types (Config(..))
2222import Data.Monoid
2323import Data.Maybe (mapMaybe)
2424import Debug.Trace (trace)
@@ -44,9 +44,6 @@ writerBench doc (name, writer) = bench (name ++ " writer") $ nf
4444
4545main :: IO ()
4646main = do
47− args <- getArgs
48− (conf,_) <- parseArgs defaultConfig{ cfgSamples = Last $ Just 20 }
49− defaultOptions args
5047 inp <- readFile "tests/testsuite.txt"
5148 let opts = def{ readerSmart = True }
5249 let doc = handleError $ readMarkdown opts inp
@@ -56,5 +53,5 @@ main = do
5653 let writers' = [(n,w) | (n, PureStringWriter w) <- writers]
5754 let writerBs = map (writerBench doc)
5855 $ writers'
59− defaultMainWith conf (return ()) $
60− writerBs ++ readerBs
56+ defaultMainWith defaultConfig{ timeLimit = 6.0 }
57+ (writerBs ++ readerBs)
pandoc.cabal+1−1
@@ -500,6 +500,6 @@ benchmark benchmark-pandoc
500500 Build-Depends: pandoc,
501501 base >= 4.2 && < 5,
502502 syb >= 0.1 && < 0.7,
503− criterion >= 0.5 && < 1.2
503+ criterion >= 1.0 && < 1.2
504504 Ghc-Options: -rtsopts -Wall -fno-warn-unused-do-bind
505505 Default-Language: Haskell98