@@ -7,6 +7,7 @@ module Main where
7import Control.Exception (handle, catch, SomeException, ErrorCall(..))
7import Control.Exception (handle, catch, SomeException, ErrorCall(..))
8import Control.Monad.Trans.State
8import Control.Monad.Trans.State
9import Control.Monad.Trans.Maybe
9import Control.Monad.Trans.Maybe
10+import Data.Char (toLower)
10import Data.Function (on, (&))
11import Data.Function (on, (&))
11import Data.List
12import Data.List
12import Data.List.Split
13import Data.List.Split
@@ -38,6 +39,7 @@ data BenchType
38 | PrimArray
39 | PrimArray
39 | Concurrent
40 | Concurrent
40 | Parallel
41 | Parallel
41 deriving Show
43 deriving Show
43data Options = Options
45data Options = Options
@@ -87,6 +89,7 @@ parseBench = do
87 Just "prim-array" -> setBenchType PrimArray
89 Just "prim-array" -> setBenchType PrimArray
88 Just "concurrent" -> setBenchType Concurrent
90 Just "concurrent" -> setBenchType Concurrent
89 Just "parallel" -> setBenchType Parallel
91 Just "parallel" -> setBenchType Parallel
92+ Just "adaptive" -> setBenchType Adaptive
90 Just str -> do
93 Just str -> do
91 liftIO $ putStrLn $ "unrecognized benchmark type " <> str
94 liftIO $ putStrLn $ "unrecognized benchmark type " <> str
@@ -360,6 +363,12 @@ main = do
360 let cfg = defaultConfig
363 let cfg = defaultConfig
361 { presentation = Groups PercentDiff
364 { presentation = Groups PercentDiff
362 , selectBenchmarks = selectBench
365 , selectBenchmarks = selectBench
366+ , selectFields = filter
367+ ( flip elem ["time" , "mean"
368+ , "maxrss", "cputime"
364 res <- parseOptions
373 res <- parseOptions
@@ -379,7 +388,9 @@ main = do
379 makeLinearAsyncGraphs
388 makeLinearAsyncGraphs
380 "charts/linear-async/results.csv"
389 "charts/linear-async/results.csv"
381 "charts/linear-async"
390 "charts/linear-async"
382− LinearRate -> benchShow opts cfg makeLinearRateGraphs
391+ LinearRate -> benchShow opts cfg
392+ { title = Just "Linear Rate" }
393+ makeLinearRateGraphs
383 "charts/linear-rate/results.csv"
394 "charts/linear-rate/results.csv"
384 "charts/linear-rate"
395 "charts/linear-rate"
385 Nested -> benchShow opts cfg
396 Nested -> benchShow opts cfg
@@ -436,6 +447,11 @@ main = do
436 (makeGraphs "parallel")
447 (makeGraphs "parallel")
437 "charts/parallel/results.csv"
448 "charts/parallel/results.csv"
438 "charts/parallel"
449 "charts/parallel"
450+ Adaptive -> benchShow opts cfg
451+ { title = Just "Adaptive" }
452+ (makeGraphs "adaptive")
453+ "charts/adaptive/results.csv"
439 Base -> do
455 Base -> do
440 let cfg' = cfg { title = Just "Base stream" }
456 let cfg' = cfg { title = Just "Base stream" }
441 if groupDiff
457 if groupDiff