mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 19:50:36 +00:00
28 lines
443 B
Go
28 lines
443 B
Go
package metrics
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Timers capture the duration and rate of events.
|
|
type Timer interface {
|
|
Count() int64
|
|
Max() int64
|
|
Mean() float64
|
|
Min() int64
|
|
Percentile(float64) float64
|
|
Percentiles([]float64) []float64
|
|
Rate1() float64
|
|
Rate5() float64
|
|
Rate15() float64
|
|
RateMean() float64
|
|
Snapshot() Timer
|
|
StdDev() float64
|
|
Stop()
|
|
Sum() int64
|
|
Time(func())
|
|
Update(time.Duration)
|
|
UpdateSince(time.Time)
|
|
Variance() float64
|
|
}
|