Skip to content

Commit

Permalink
mvcc: fix db_compaction_total_duration_milliseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
yingnanzhang666 committed Apr 16, 2019
1 parent f29b1ad commit c5cb550
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 c5cb550

Please sign in to comment.