export metrics from bench.
This commit is contained in:
parent
b1aa43741a
commit
8befc0c1f5
@ -20,6 +20,7 @@ import (
|
|||||||
"github.com/cockroachdb/pebble"
|
"github.com/cockroachdb/pebble"
|
||||||
"github.com/cockroachdb/pebble/bloom"
|
"github.com/cockroachdb/pebble/bloom"
|
||||||
"github.com/ipfs/go-cid"
|
"github.com/ipfs/go-cid"
|
||||||
|
metricsi "github.com/ipfs/go-metrics-interface"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||||
|
|
||||||
@ -235,9 +236,10 @@ var importBenchCmd = &cli.Command{
|
|||||||
defer c.Close() //nolint:errcheck
|
defer c.Close() //nolint:errcheck
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx := metricsi.CtxScope(context.Background(), "lotus")
|
||||||
cacheOpts := blockstore.DefaultCacheOpts()
|
cacheOpts := blockstore.DefaultCacheOpts()
|
||||||
cacheOpts.HasBloomFilterSize = 0
|
cacheOpts.HasBloomFilterSize = 0
|
||||||
bs, err = blockstore.CachedBlockstore(context.TODO(), bs, cacheOpts)
|
bs, err = blockstore.CachedBlockstore(ctx, bs, cacheOpts)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user