Skip to content

Commit

Permalink
record datastore metrics after successful run
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping authored and magik6k committed Oct 22, 2020
1 parent 0341944 commit 602d2b8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cmd/lotus-bench/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

},
Expand Down

0 comments on commit 602d2b8

Please sign in to comment.