Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2020-09-18 13:54:20 +02:00
parent 108fe7823c
commit 782717948a
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -114,7 +114,11 @@ var importBenchCmd = &cli.Command{
return err
}
bds.CollectGarbage()
if cctx.Bool("only-gc") {
log.Info("calling CollectGarbage on main ds")
bds.CollectGarbage()
log.Info("done calling CollectGarbage on main ds")
}
bs := blockstore.NewBlockstore(bds)
cbs, err := blockstore.CachedBlockstore(context.TODO(), bs, blockstore.DefaultCacheOpts())
if err != nil {
@ -129,7 +133,12 @@ var importBenchCmd = &cli.Command{
if err != nil {
return xerrors.Errorf("opening syscall-cache datastore: %w", err)
}
scds.CollectGarbage()
if cctx.Bool("only-gc") {
log.Info("calling CollectGarbage on syscall ds")
scds.CollectGarbage()
log.Info("done calling CollectGarbage on syscall ds")
}
verifier = &cachingVerifier{
ds: scds,
backend: verifier,