record datastore metrics after successful run

This commit is contained in:
whyrusleeping 2020-10-13 21:24:56 -07:00 committed by Łukasz Magiera
parent 0341944350
commit 602d2b8ad5

View File

@ -320,6 +320,21 @@ var importBenchCmd = &cli.Command{
pprof.StopCPUProfile() 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 return nil
}, },