diff --git a/cmd/lotus-bench/import.go b/cmd/lotus-bench/import.go index de3a0ea45..681d7ede2 100644 --- a/cmd/lotus-bench/import.go +++ b/cmd/lotus-bench/import.go @@ -320,6 +320,21 @@ var importBenchCmd = &cli.Command{ pprof.StopCPUProfile() + if true { + resp, err := http.Get("http://localhost:6060/debug/metrics/prometheus") + if err != nil { + return err + } + + metricsfi, err := os.Create("import-bench.metrics") + if err != nil { + return err + } + + io.Copy(metricsfi, resp.Body) + metricsfi.Close() + } + return nil },