11module Bench.Database.LSMTree.Internal.Merge (benchmarks ) where
22
33import Control.Monad (when , zipWithM )
4+ import Control.Monad.Primitive
45import Criterion.Main (Benchmark , bench , bgroup )
56import qualified Criterion.Main as Cr
67import Data.Bifunctor (first )
@@ -226,7 +227,7 @@ merge ::
226227 -> Config
227228 -> Run. RunFsPaths
228229 -> InputRuns
229- -> IO (Run (FS. Handle (FS. HandleIO )))
230+ -> IO (Run RealWorld (FS. Handle (FS. HandleIO )))
230231merge fs hbio Config {.. } targetPaths runs = do
231232 let f = fromMaybe const mergeMappend
232233 m <- fromMaybe (error " empty inputs, no merge created" ) <$>
@@ -244,7 +245,7 @@ outputRunPaths = RunFsPaths (FS.mkFsPath []) 0
244245inputRunPaths :: [Run. RunFsPaths ]
245246inputRunPaths = RunFsPaths (FS. mkFsPath [] ) <$> [1 .. ]
246247
247- type InputRuns = [Run (FS. Handle FS. HandleIO )]
248+ type InputRuns = [Run RealWorld (FS. Handle FS. HandleIO )]
248249
249250type Mappend = SerialisedValue -> SerialisedValue -> SerialisedValue
250251
@@ -360,7 +361,7 @@ createRun ::
360361 -> Maybe Mappend
361362 -> Run. RunFsPaths
362363 -> [SerialisedKOp ]
363- -> IO (Run (FS. Handle h ))
364+ -> IO (Run RealWorld (FS. Handle h ))
364365createRun hasFS hasBlockIO mMappend targetPath =
365366 Run. fromWriteBuffer hasFS hasBlockIO Run. CacheRunData (RunAllocFixed 10 ) targetPath
366367 . Fold. foldl insert WB. empty
0 commit comments