mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-05 10:32:19 +00:00
21 lines
286 B
Go
21 lines
286 B
Go
|
package metrics
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
|
||
|
"github.com/prometheus/client_golang/prometheus"
|
||
|
)
|
||
|
|
||
|
type Summary interface {
|
||
|
prometheus.Summary
|
||
|
DurationObserver
|
||
|
}
|
||
|
|
||
|
type summary struct {
|
||
|
prometheus.Summary
|
||
|
}
|
||
|
|
||
|
func (s *summary) ObserveDuration(start time.Time) {
|
||
|
s.Observe(secondsSince(start))
|
||
|
}
|