зеркало из https://github.com/golang/pkgsite.git
internal/teeproxy: fix metrics being recorded in ns instead of ms
Change-Id: Iebba0d9ab510aa2391d0dcb1c2043e10149c5a7c Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/245097 Reviewed-by: Julie Qiu <julie@golang.org>
This commit is contained in:
Родитель
26e89ddf7d
Коммит
6b36b65687
|
@ -378,8 +378,8 @@ func (s *Server) makePkgGoDevRequest(ctx context.Context, redirectHost, redirect
|
|||
// recordTeeProxyMetric records the latencies and counts of requests from
|
||||
// godoc.org and to pkg.go.dev, tagged with the response status code.
|
||||
func recordTeeProxyMetric(status int, host string, gddoLatency, pkgGoDevLatency time.Duration) {
|
||||
gddoL := gddoLatency.Seconds() / 1000
|
||||
pkgGoDevL := pkgGoDevLatency.Seconds() / 1000
|
||||
gddoL := gddoLatency.Seconds() * 1000
|
||||
pkgGoDevL := pkgGoDevLatency.Seconds() * 1000
|
||||
|
||||
stats.RecordWithTags(context.Background(), []tag.Mutator{
|
||||
tag.Upsert(keyTeeproxyStatus, strconv.Itoa(status)),
|
||||
|
|
Загрузка…
Ссылка в новой задаче