Upgrade versions of vendored libs
This commit is contained in:
13
vendor/github.com/cockroachdb/pebble/internal/base/metrics.go
generated
vendored
13
vendor/github.com/cockroachdb/pebble/internal/base/metrics.go
generated
vendored
@@ -29,6 +29,13 @@ func (tm *ThroughputMetric) Merge(x ThroughputMetric) {
|
||||
tm.IdleDuration += x.IdleDuration
|
||||
}
|
||||
|
||||
// Subtract subtracts the information from another ThroughputMetric
|
||||
func (tm *ThroughputMetric) Subtract(x ThroughputMetric) {
|
||||
tm.Bytes -= x.Bytes
|
||||
tm.WorkDuration -= x.WorkDuration
|
||||
tm.IdleDuration -= x.IdleDuration
|
||||
}
|
||||
|
||||
// PeakRate returns the approximate peak rate if there was no idling.
|
||||
func (tm *ThroughputMetric) PeakRate() int64 {
|
||||
if tm.Bytes == 0 {
|
||||
@@ -67,6 +74,12 @@ func (gsm *GaugeSampleMetric) Merge(x GaugeSampleMetric) {
|
||||
gsm.count += x.count
|
||||
}
|
||||
|
||||
// Subtract subtracts the information from another gauge metric.
|
||||
func (gsm *GaugeSampleMetric) Subtract(x GaugeSampleMetric) {
|
||||
gsm.sampleSum -= x.sampleSum
|
||||
gsm.count -= x.count
|
||||
}
|
||||
|
||||
// Mean returns the mean value.
|
||||
func (gsm *GaugeSampleMetric) Mean() float64 {
|
||||
if gsm.count == 0 {
|
||||
|
||||
Reference in New Issue
Block a user