Skip to content

Commit

Permalink
inflight->hit
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry committed Feb 15, 2024
1 parent 6fbba22 commit cc756c6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pmtiles/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions pmtiles/server_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit cc756c6

Please sign in to comment.