Skip to content

Commit

Permalink
TOSQUASH
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisdral committed May 8, 2024
1 parent 738df54 commit 787fff2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions bench/macro/Bench/Database/LSMTree/Internal/Lookup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,13 @@ benchmarks = do

traceMarkerIO "Generating runs"
putStr "<Generating runs>"
-- this key is reused for both setting up the runs and generating lookup
-- batches. This ensures that we only look up keys that we have put in a
-- run. Also, prepLookupsEnv makes to shuffle the generated keys into the
-- different runs, such that the generated lookups access the runs in random
-- places.
-- This initial key RNG is used for both generating the runs and generating
-- lookup batches. This ensures that we only look up keys that we have put
-- in a run. Also, lookupsEnv shuffles the generated keys into the different
-- runs, such that the generated lookups access the runs in random places
-- instead of sequentially.
let keyRng0 = mkStdGen 17
(!runs, !blooms, !indexes, !handles, !benchTmpDir, !hfs, !hbio) <- prepLookupsEnv runSizes keyRng0
(!runs, !blooms, !indexes, !handles, !benchTmpDir, !hfs, !hbio) <- lookupsEnv runSizes keyRng0
putStrLn "<finished>"

traceMarkerIO "Computing statistics for generated runs"
Expand Down Expand Up @@ -143,12 +143,12 @@ benchmarks = do
bgenKeyBatches
_bindexSearches <-
benchmark "benchIndexSearches"
"Calculate batches of keys, perform bloom queries for each batch, and perform index searches for positively queried keys in each batch. Net time/allocation is the result of subtracting the cost of benchBloomQueries"
"Calculate batches of keys, perform bloom queries for each batch, and perform index searches for positively queried keys in each batch. Net time/allocation is the result of subtracting the cost of benchBloomQueries."
(benchIndexSearches blooms indexes handles keyRng0) benchmarkNumLookups
bbloomQueries
_bprepLookups <-
benchmark "benchPrepLookups"
"Calculate batches of keys, and prepare lookups for each batch. This is roughly doing the same as benchIndexSearches. Net time/allocation is the result of subtracting the cost of benchGenKeyBatches."
"Calculate batches of keys, and prepare lookups for each batch. This is roughly doing the same amount of work as benchIndexSearches. Net time/allocation is the result of subtracting the cost of benchGenKeyBatches."
(benchPrepLookups blooms indexes handles keyRng0) benchmarkNumLookups
bgenKeyBatches
_blookupsInBatches <-
Expand Down Expand Up @@ -257,7 +257,7 @@ totalNumEntriesSanityCheck l1 runSizes =
-- * where the total size of the filters is too large to fully fit in cache
-- (though the smaller ones may fit in the caches).
--
prepLookupsEnv ::
lookupsEnv ::
[RunSizeInfo]
-> StdGen -- ^ Key RNG
-> IO ( V.Vector (Run (FS.Handle FS.HandleIO))
Expand All @@ -268,7 +268,7 @@ prepLookupsEnv ::
, FS.HasFS IO FS.HandleIO
, FS.HasBlockIO IO FS.HandleIO
)
prepLookupsEnv runSizes keyRng0 = do
lookupsEnv runSizes keyRng0 = do
sysTmpDir <- getCanonicalTemporaryDirectory
benchTmpDir <- createTempDirectory sysTmpDir "lookups-macro-bench"
let hfs = FS.ioHasFS (FS.MountPoint benchTmpDir)
Expand Down

0 comments on commit 787fff2

Please sign in to comment.