mirror of https://github.com/voidlizard/hbs2
wip, fixed test a little bit
This commit is contained in:
parent
6fb8d808a0
commit
e51b72d57c
|
@ -792,17 +792,17 @@ testNCQ2Simple1 syn TestEnv{..} = do
|
||||||
|
|
||||||
notice $ "merge data"
|
notice $ "merge data"
|
||||||
|
|
||||||
ncqWithStorage ncqDir $ \sto -> liftIO do
|
-- ncqWithStorage ncqDir $ \sto -> liftIO do
|
||||||
notice "perform merge"
|
-- notice "perform merge"
|
||||||
ncqMergeFull sto
|
-- ncqMergeFull sto
|
||||||
ncqSweepStates sto
|
-- ncqSweepStates sto
|
||||||
ncqSweepFossils sto
|
-- ncqSweepFossils sto
|
||||||
|
|
||||||
notice $ "full sweep unused states"
|
-- notice $ "full sweep unused states"
|
||||||
|
|
||||||
ncqWithStorage ncqDir $ \sto -> liftIO do
|
-- ncqWithStorage ncqDir $ \sto -> liftIO do
|
||||||
ncqSweepStates sto
|
-- ncqSweepStates sto
|
||||||
ncqSweepFossils sto
|
-- ncqSweepFossils sto
|
||||||
|
|
||||||
notice $ "lookup" <+> pretty n <+> "blocks"
|
notice $ "lookup" <+> pretty n <+> "blocks"
|
||||||
|
|
||||||
|
@ -810,18 +810,17 @@ testNCQ2Simple1 syn TestEnv{..} = do
|
||||||
|
|
||||||
replicateM_ l do
|
replicateM_ l do
|
||||||
|
|
||||||
-- performMajorGC
|
t0 <- getTimeCoarse
|
||||||
|
|
||||||
(t1,_) <- timeItT do
|
pooledForConcurrentlyN_ 8 hashes $ \ha -> do
|
||||||
|
found <- ncqLocate2 sto ha <&> maybe (-1) ncqEntrySize
|
||||||
for_ hashes $ \ha -> do
|
assertBool (show $ "found" <+> pretty ha) (found > 0)
|
||||||
found <- ncqLocate2 sto ha <&> maybe (-1) ncqEntrySize
|
-- debug $ fill 44 (pretty ha) <+> fill 8 (pretty found)
|
||||||
assertBool (show $ "found" <+> pretty ha) (found > 0)
|
|
||||||
-- debug $ fill 44 (pretty ha) <+> fill 8 (pretty found)
|
|
||||||
|
|
||||||
notice $ pretty (sec6 t1) <+> "lookup" <+> pretty n <+> "blocks"
|
|
||||||
|
|
||||||
|
t1 <- getTimeCoarse
|
||||||
|
let dt = realToFrac (toNanoSecs (t1 - t0)) / 1e9 :: Fixed E3
|
||||||
|
|
||||||
|
notice $ pretty (sec6 dt) <+> "lookup" <+> pretty n <+> "blocks"
|
||||||
|
|
||||||
testNCQ2Lookup2:: forall c m . (MonadUnliftIO m, IsContext c)
|
testNCQ2Lookup2:: forall c m . (MonadUnliftIO m, IsContext c)
|
||||||
=> [Syntax c]
|
=> [Syntax c]
|
||||||
|
@ -841,7 +840,7 @@ testNCQ2Lookup2 syn TestEnv{..} = do
|
||||||
let n = headDef 100000 [ fromIntegral x | LitIntVal x <- argz ]
|
let n = headDef 100000 [ fromIntegral x | LitIntVal x <- argz ]
|
||||||
let nt = max 2 . headDef 1 $ [ fromIntegral x | LitIntVal x <- drop 1 argz ]
|
let nt = max 2 . headDef 1 $ [ fromIntegral x | LitIntVal x <- drop 1 argz ]
|
||||||
let nl = headDef 3 $ [ fromIntegral x | LitIntVal x <- drop 2 argz ]
|
let nl = headDef 3 $ [ fromIntegral x | LitIntVal x <- drop 2 argz ]
|
||||||
let r = (4*1024, 64*1024)
|
let r = (64*1024, 256*1024)
|
||||||
|
|
||||||
let merge = headDef False [ True | ListVal [StringLike "-m"] <- opts ]
|
let merge = headDef False [ True | ListVal [StringLike "-m"] <- opts ]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue