export metrics from bench.

This commit is contained in:
Raúl Kripalani 2020-11-05 19:09:47 +00:00
parent b1aa43741a
commit 8befc0c1f5

View File

@ -20,6 +20,7 @@ import (
"github.com/cockroachdb/pebble"
"github.com/cockroachdb/pebble/bloom"
"github.com/ipfs/go-cid"
metricsi "github.com/ipfs/go-metrics-interface"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
@ -235,9 +236,10 @@ var importBenchCmd = &cli.Command{
defer c.Close() //nolint:errcheck
}
ctx := metricsi.CtxScope(context.Background(), "lotus")
cacheOpts := blockstore.DefaultCacheOpts()
cacheOpts.HasBloomFilterSize = 0
bs, err = blockstore.CachedBlockstore(context.TODO(), bs, cacheOpts)
bs, err = blockstore.CachedBlockstore(ctx, bs, cacheOpts)
if err != nil {
return err
}