Add bench mark

This commit is contained in:
Ranjeet Kumar Ranjan 2021-10-07 17:37:39 +05:30 committed by Harendra Kumar
parent 9e29c70b60
commit b926110aff

View File

@ -216,6 +216,13 @@ parseManyGroupsRolling :: MonadThrow m => Bool -> SerialT m Int -> m ()
parseManyGroupsRolling b =
IP.drain . IP.parseManyD (PR.groupByRolling (\_ _ -> b) FL.drain)
{-# INLINE parseManyGroupsRollingEither #-}
parseManyGroupsRollingEither :: (MonadThrow m, MonadCatch m) =>
Bool -> SerialT m Int -> m ()
parseManyGroupsRollingEither b =
IP.drain .
IP.parseManyD (PR.groupByRollingEither (\_ _ -> b) FL.drain FL.drain)
-------------------------------------------------------------------------------
-- Parsing with unfolds
-------------------------------------------------------------------------------
@ -333,6 +340,10 @@ o_1_space_serial_nested value =
, benchIOSink value "parseMany groupBy (1 group)" $ (parseManyGroups True)
, benchIOSink value "parseMany groupRollingBy (1 group)"
$ (parseManyGroupsRolling True)
, benchIOSink value "parseMany groupRollingByEither (1 group)"
$ (parseManyGroupsRollingEither True)
, benchIOSink value "parseMany groupRollingByEither (bound groups)"
$ (parseManyGroupsRollingEither False)
]
o_1_space_serial_unfold :: Int -> [Array.Array Int] -> [Benchmark]