on master help sign in
use bench-show 0.3
commit379732da249935d0a1c59e3bdfacd29670a694bb authorHarendra Kumar <harendra.kumar@gmail.com> dateTue 27 Aug 2019, 23:34 (7 years ago) parentc6f8df0
3 files changed+8−5
benchmark/Chart.hs+5−3 benchmark/NanoBenchmarks.hs+2−1 streamly.cabal+1−1
benchmark/Chart.hs+5−3
@@ -295,14 +295,16 @@ showStreamK Options{..} cfg inp out =
295295-- text reports
296296------------------------------------------------------------------------------
297297
298−selectBench :: (SortColumn -> Either String [(String, Double)]) -> [String]
298+selectBench
299+ :: (SortColumn -> Maybe GroupStyle -> Either String [(String, Double)])
300+ -> [String]
299301selectBench f =
300302 reverse
301303 $ fmap fst
302304 $ either
303− (const $ either error (sortOn snd) $ f $ ColumnIndex 0)
305+ (const $ either error (sortOn snd) $ f (ColumnIndex 0) (Just PercentDiff))
304306 (sortOn snd)
305− $ f $ ColumnIndex 1
307+ $ f (ColumnIndex 1) (Just PercentDiff)
306308
307309benchShow Options{..} cfg func inp out =
308310 if genGraphs
benchmark/NanoBenchmarks.hs+2−1
@@ -12,6 +12,7 @@ import Streamly.SVar (MonadAsync)
1212import qualified Streamly.Memory.Array as A
1313import qualified Streamly.FileSystem.Handle as FH
1414import qualified Streamly.Fold as FL
15+import qualified Streamly.Internal as Internal
1516import qualified Streamly.Prelude as S
1617import qualified Streamly.Streams.StreamK as K
1718
@@ -110,7 +111,7 @@ main = do
110111
111112 inText <- openFile "benchmark/text-processing/gutenberg-500.txt" ReadMode
112113 defaultMain [mkBenchText "splitOn abc...xyz" inText $ do
113− (S.length $ FL.splitOn (A.fromList $ map (fromIntegral . ord)
114+ (S.length $ Internal.splitOnSeq (A.fromList $ map (fromIntegral . ord)
114115 "abcdefghijklmnopqrstuvwxyz") FL.drain
115116 $ FH.read inText) >>= print
116117 ]
streamly.cabal+1−1
@@ -757,7 +757,7 @@ executable chart
757757 buildable: True
758758 build-Depends:
759759 base >= 4.8 && < 5
760− , bench-show >= 0.2 && < 0.3
760+ , bench-show >= 0.3 && < 0.4
761761 , split
762762 , transformers >= 0.4 && < 0.6
763763 else