Skip to content

Commit

Permalink
Reset RocksDB stats after getting ticker
Browse files Browse the repository at this point in the history
  • Loading branch information
aalda committed Mar 29, 2019
1 parent 43ba855 commit 73cb1a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/rocks/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ func (m *ioMetrics) PrometheusCollectors() []prometheus.Collector {

func extractMetric(stats *rocksdb.Statistics, ticker rocksdb.TickerType) func() float64 {
return func() float64 {
return float64(stats.GetTickerCount(ticker))
return float64(stats.GetAndResetTickerCount(ticker))
}
}

0 comments on commit 73cb1a0

Please sign in to comment.