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 authored and jpbetz committed Apr 17, 2019
1 parent 45d616a commit 1364ca2
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 @@ -21,7 +21,7 @@ import (

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

end := make([]byte, 8)
binary.BigEndian.PutUint64(end, uint64(compactMainRev+1))
Expand Down

0 comments on commit 1364ca2

Please sign in to comment.