Skip to content

Commit

Permalink
fix typo in Basic benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
agentm committed Aug 27, 2024
1 parent c02bea7 commit 04c29e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion src/bin/benchmark/Basic.hs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ main = do
where
createRel = bgroup "create" $ map (\tupCount -> bench ("relation 10x" ++ show tupCount) (nf (createRelation' 10) tupCount)) [100, 1000, 10000]
bigrel10000 = createRelation' 10 10000
biBgrel1000 = createRelation' 10 1000
bigrel1000 = createRelation' 10 1000
bigrel100 = createRelation' 10 100

restrictRel = bgroup "restrict" [restrictOneTupleRel, restrictHalfTuplesRel]
Expand Down
4 changes: 0 additions & 4 deletions src/lib/ProjectM36/RelExprCache.hs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ add rgen expr exprResult calcTime cache = do
upperBound' <- readTVar (upperBound cache)
-- calculate probability of immediate ejection
let probRetain = probOfRetention (keySize + valSize) upperBound' 0 0 calcTime

(rand, rgen') = uniformR (0.0, 1.0) rgen

-- (rand, rgen') = randomR (0.0, 1.0) rgen

when (probRetain >= rand) $ M.insert newCacheInfo expr (cacheMap cache)
pure rgen'
Just _ -> -- then entry is already cached, nothing to do
Expand Down

0 comments on commit 04c29e2

Please sign in to comment.