Skip to content

Commit

Permalink
Merge pull request #10646 from yingnanzhang666/metrics_db_compaction
Browse files Browse the repository at this point in the history
fix issue that metric db_compaction_total_duration_milliseconds is always 0
  • Loading branch information
jingyih authored Apr 20, 2019
2 parents 85594ae + c5cb550 commit 943d688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mvcc/kvstore_compaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (

func (s *store) scheduleCompaction(compactMainRev int64, keep map[revision]struct{}) bool {
totalStart := time.Now()
defer dbCompactionTotalMs.Observe(float64(time.Since(totalStart) / time.Millisecond))
defer func() { dbCompactionTotalMs.Observe(float64(time.Since(totalStart) / time.Millisecond)) }()
keyCompactions := 0
defer func() { dbCompactionKeysCounter.Add(float64(keyCompactions)) }()

Expand Down

0 comments on commit 943d688

Please sign in to comment.