record datastore metrics after successful run

This commit is contained in:
whyrusleeping
2020-10-22 14:57:06 +02:00
committed by Łukasz Magiera
parent 0341944350
commit 602d2b8ad5
+15
View File
@@ -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
},