mirror of
https://github.com/prometheus/prometheus
synced 2024-12-27 17:13:22 +00:00
Fix indexing latency instrumentation.
Change-Id: I532c170121cd2996d1a378adbb1fd551cd5a4e38
This commit is contained in:
parent
01dd618a20
commit
df1b2a2422
@ -710,9 +710,10 @@ func (p *diskPersistence) processIndexingQueue() {
|
||||
defer batchTimeout.Stop()
|
||||
|
||||
commitBatch := func() {
|
||||
begin := time.Now()
|
||||
defer p.indexingBatchLatency.Observe(float64(time.Since(begin) / time.Millisecond))
|
||||
p.indexingBatchSizes.Observe(float64(batchSize))
|
||||
defer func(begin time.Time) {
|
||||
p.indexingBatchLatency.Observe(float64(time.Since(begin) / time.Millisecond))
|
||||
}(time.Now())
|
||||
|
||||
if err := p.labelPairToFingerprints.IndexBatch(pairToFPs); err != nil {
|
||||
glog.Error("Error indexing label pair to fingerprints batch: ", err)
|
||||
|
Loading…
Reference in New Issue
Block a user