internal/fetch: change fetch latency metric to seconds
We were using milliseconds as the unit of fetch latency, which
is too small.
Change-Id: I94290c8f6b92084b332bd3a942d3fcf219324c50
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/257242
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
diff --git a/internal/fetch/fetch.go b/internal/fetch/fetch.go
index ffb18a5..c0ada85 100644
--- a/internal/fetch/fetch.go
+++ b/internal/fetch/fetch.go
@@ -40,13 +40,14 @@
fetchLatency = stats.Float64(
"go-discovery/worker/fetch-latency",
"Latency of a fetch request.",
- stats.UnitMilliseconds,
+ stats.UnitSeconds,
)
fetchesShedded = stats.Int64(
"go-discovery/worker/fetch-shedded",
"Count of shedded fetches.",
stats.UnitDimensionless,
)
+
// FetchLatencyDistribution aggregates frontend fetch request
// latency by status code. It does not count shedded requests.
FetchLatencyDistribution = &view.View{