Skip to content

Commit 9802630

Browse files
committed
fix label for "has large k/op"
For example, before: prop_WriteNumEntries: OK (2.29s) +++ OK, passed 100 tests: 96% has large k/op 4% no large k/op But now we see the actual numbers: prop_WriteNumEntries: OK (2.37s) +++ OK, passed 100 tests: 52% has large k/op 48% no large k/op However, that should still be good enough.
1 parent bcdb227 commit 9802630

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src-extras/Database/LSMTree/Extras/RunData.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,15 @@ simplePaths ns = fmap simplePath ns
184184
QuickCheck
185185
-------------------------------------------------------------------------------}
186186

187+
{- HLINT ignore "Hoist not" -}
187188
labelRunData :: SerialisedRunData -> Property -> Property
188189
labelRunData (RunData m) = tabulate "value size" size . label note
189190
where
190191
kops = Map.toList m
191192
size = map (showPowersOf10 . sizeofValue) vals
192193
vals = concatMap (bifoldMap pure mempty . snd) kops
193194
note
194-
| any (uncurry entryWouldFitInPage) kops = "has large k/op"
195+
| any (not . uncurry entryWouldFitInPage) kops = "has large k/op"
195196
| otherwise = "no large k/op"
196197

197198
instance ( Ord k, Arbitrary k, Arbitrary v, Arbitrary b

test/Test/Database/LSMTree/Internal/Merge.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ prop_MergeDistributes fs hbio mergeType stepSize (SmallList rds) =
111111
rds' = fmap serialiseRunData rds
112112
kops = foldMap (Map.toList . unRunData) rds'
113113
vals = concatMap (bifoldMap pure mempty . snd) kops
114-
isLarge = uncurry entryWouldFitInPage
114+
isLarge = not . uncurry entryWouldFitInPage
115115

116116
getRunContent run@(DeRef Run.Run {
117117
Run.runFilter,

0 commit comments

Comments
 (0)