Skip to content

Commit

Permalink
add report miss and hit functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Freddy committed Nov 29, 2023
1 parent d4c4c27 commit b9b7872
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions reporter/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,13 @@ func NewPrometheusCounter(
},
})
}

// ReportMiss reports a cache miss
func (pr *PrometheusReporter) ReportMiss() {
pr.missCounter.Inc()
}

// ReportHit reports a cache hit
func (pr *PrometheusReporter) ReportHit() {
pr.hitCounter.Inc()
}

0 comments on commit b9b7872

Please sign in to comment.