From 13a8f21dc5f7c0574b49086209d03430bb5d3468 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Thu, 27 Oct 2016 07:00:06 -0700 Subject: [PATCH] cli: fix benchmark build failure (fixes #423) --- hledger/bench/bench.hs | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/hledger/bench/bench.hs b/hledger/bench/bench.hs index f76e1bcd6..427cb3d9a 100644 --- a/hledger/bench/bench.hs +++ b/hledger/bench/bench.hs @@ -24,10 +24,14 @@ main = do -- withArgs ["--criterion"] $ do args <- getArgs if "--criterion" `elem` args - then withArgs [] benchWithCriterion - else if "--quickbench" `elem` args - then benchWithQuickbench - else benchWithTimeit + then + withArgs [] benchWithCriterion + else +-- if "--quickbench" `elem` args +-- then +-- benchWithQuickbench +-- else + benchWithTimeit benchWithTimeit = do getCurrentDirectory >>= printf "Benchmarking hledger in %s with timeit\n" @@ -57,13 +61,13 @@ benchWithCriterion = do bench ("stats") $ nfIO $ stats opts j ] -benchWithQuickbench = do - let whichcmd = if os == "mingw32" then "where" else "which" - exe <- init <$> readProcess whichcmd ["hledger"] "" - pwd <- getCurrentDirectory - printf "Benchmarking %s in %s with quickbench and shell\n" exe pwd - flip withArgs QuickBench.defaultMain [ - "-fbench/default.bench" - ,"-v" - ,"hledger" - ] +-- benchWithQuickbench = do +-- let whichcmd = if os == "mingw32" then "where" else "which" +-- exe <- init <$> readProcess whichcmd ["hledger"] "" +-- pwd <- getCurrentDirectory +-- printf "Benchmarking %s in %s with quickbench and shell\n" exe pwd +-- flip withArgs QuickBench.defaultMain [ +-- "-fbench/default.bench" +-- ,"-v" +-- ,"hledger" +-- ]