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:
shaquilleq 2020-07-27 13:39:36 -07:00 коммит произвёл Shaquille Que
Родитель 26e89ddf7d
Коммит 6b36b65687
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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)),