Update latency

This commit is contained in:
giongto35 2019-06-19 04:23:33 +08:00 committed by giongto35
parent 0bc8ce03f2
commit 1b39947541
3 changed files with 6 additions and 6 deletions

View file

@ -72,7 +72,11 @@ func initializeWorker() {
}
l.Close()
http.Handle("/metrics", promhttp.Handler())
if port == 9000 {
// only turn on metric for the first worker to avoid overlap
http.Handle("/metrics", promhttp.Handler())
}
http.ListenAndServe(":"+strconv.Itoa(port), nil)
}
}