mirror of
https://github.com/ilyakooo0/streamly.git
synced 2024-10-06 13:17:10 +03:00
ignore and continue when graph generation fails
This commit is contained in:
parent
7aae14a59f
commit
9c35804edc
@ -1,10 +1,12 @@
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
|
||||
module Main where
|
||||
|
||||
import Data.List
|
||||
import Data.List.Split
|
||||
import BenchGraph (bgraph, defaultConfig, Config(..), ComparisonStyle(..))
|
||||
import Control.Applicative ((<|>))
|
||||
import Control.Exception (handle, catch, SomeException, ErrorCall)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
@ -13,13 +15,15 @@ main = do
|
||||
, comparisonStyle = CompareDelta
|
||||
}
|
||||
|
||||
ignoringErr a = catch a (\(_ :: ErrorCall) ->
|
||||
putStrLn "Failed. Skipping.")
|
||||
-- bgraph <input> <output> <field in csv file to be plotted>
|
||||
-- other interesting fields to plot are:
|
||||
-- allocated
|
||||
-- bytesCopied
|
||||
-- mutatorCpuSeconds
|
||||
-- gcCpuSeconds
|
||||
bgraph "charts/results.csv" "operations" "time" $ cfg
|
||||
ignoringErr $ bgraph "charts/results.csv" "operations" "time" $ cfg
|
||||
{ chartTitle = Just "Streamly operations (time)"
|
||||
, classifyBenchmark = \b ->
|
||||
if "compose" `isPrefixOf` b || "/concat" `isSuffixOf` b
|
||||
@ -27,12 +31,13 @@ main = do
|
||||
else Just ("Streamly", last $ splitOn "/" b)
|
||||
}
|
||||
|
||||
bgraph "charts/results.csv" "composition" "time" $ cfg
|
||||
ignoringErr $ bgraph "charts/results.csv" "composition" "time" $ cfg
|
||||
{ chartTitle = Just "Streamly composition performance (time)"
|
||||
, classifyBenchmark = fmap ("Streamly",) . stripPrefix "compose/"
|
||||
}
|
||||
|
||||
bgraph "charts/results.csv" "composition-scaling" "time" $ cfg
|
||||
ignoringErr $ bgraph "charts/results.csv" "composition-scaling" "time"
|
||||
$ cfg
|
||||
{ chartTitle = Just "Streamly composition scaling (time)"
|
||||
, classifyBenchmark = fmap ("Streamly",) . stripPrefix "compose-"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user