diff --git a/pmtiles/server.go b/pmtiles/server.go index f9c6125..5390fca 100644 --- a/pmtiles/server.go +++ b/pmtiles/server.go @@ -129,7 +129,7 @@ func (server *Server) Start() { server.metrics.cacheRequest(key.name, "hit") } else if _, ok := inflight[key]; ok { inflight[key] = append(inflight[key], req) - server.metrics.cacheRequest(key.name, "inflight") + server.metrics.cacheRequest(key.name, "hit") // treat inflight as a hit since it doesn't make a new server request } else { inflight[key] = []request{req} server.metrics.cacheRequest(key.name, "miss") diff --git a/pmtiles/server_metrics.go b/pmtiles/server_metrics.go index 690a7ed..8d41bab 100644 --- a/pmtiles/server_metrics.go +++ b/pmtiles/server_metrics.go @@ -126,7 +126,7 @@ func createMetrics(scope string, logger *log.Logger) *metrics { durationBuckets := prometheus.DefBuckets kib := 1024.0 mib := kib * kib - sizeBuckets := []float64{1.0 * kib, 5.0 * kib, 10.0 * kib, 50.0 * kib, 100 * kib, 200 * kib, 500 * kib, 1.0 * mib, 2.5 * mib, 5.0 * mib} + sizeBuckets := []float64{1.0 * kib, 5.0 * kib, 10.0 * kib, 25.0 * kib, 50.0 * kib, 100 * kib, 250 * kib, 500 * kib, 1.0 * mib} return &metrics{ // overall requests @@ -174,7 +174,7 @@ func createMetrics(scope string, logger *log.Logger) *metrics { Namespace: namespace, Subsystem: scope, Name: "dir_cache_requests", - Help: "Requests to the directory cache by archive and status (hit/inflight/miss)", + Help: "Requests to the directory cache by archive and status (hit/miss)", }, []string{"archive", "status"})), // requests to bucket