From 782717948ae9926e4afa7a42f758e8c70abe13d8 Mon Sep 17 00:00:00 2001 From: Jakub Sztandera Date: Fri, 18 Sep 2020 13:54:20 +0200 Subject: [PATCH] Add logs Signed-off-by: Jakub Sztandera --- cmd/lotus-bench/import.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cmd/lotus-bench/import.go b/cmd/lotus-bench/import.go index 72ac5d60b..c6d49a78c 100644 --- a/cmd/lotus-bench/import.go +++ b/cmd/lotus-bench/import.go @@ -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,