aboutsummaryrefslogtreecommitdiff
path: root/benchmark/benchmark-pandoc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark/benchmark-pandoc.hs')
-rw-r--r--benchmark/benchmark-pandoc.hs11
1 files changed, 3 insertions, 8 deletions
diff --git a/benchmark/benchmark-pandoc.hs b/benchmark/benchmark-pandoc.hs
index 3fc70331f..d86d38f60 100644
--- a/benchmark/benchmark-pandoc.hs
+++ b/benchmark/benchmark-pandoc.hs
@@ -17,9 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-}
import Text.Pandoc
import Criterion.Main
-import Criterion.Config
-import System.Environment (getArgs)
-import Data.Monoid
+import Criterion.Types (Config(..))
import Data.Maybe (mapMaybe)
import Debug.Trace (trace)
import Text.Pandoc.Error
@@ -44,9 +42,6 @@ writerBench doc (name, writer) = bench (name ++ " writer") $ nf
main :: IO ()
main = do
- args <- getArgs
- (conf,_) <- parseArgs defaultConfig{ cfgSamples = Last $ Just 20 }
- defaultOptions args
inp <- readFile "tests/testsuite.txt"
let opts = def{ readerSmart = True }
let doc = handleError $ readMarkdown opts inp
@@ -56,5 +51,5 @@ main = do
let writers' = [(n,w) | (n, PureStringWriter w) <- writers]
let writerBs = map (writerBench doc)
$ writers'
- defaultMainWith conf (return ()) $
- writerBs ++ readerBs
+ defaultMainWith defaultConfig{ timeLimit = 6.0 }
+ (writerBs ++ readerBs)