mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 09:37:38 +00:00
21 lines
294 B
Go
21 lines
294 B
Go
package metrics
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
)
|
|
|
|
type Histogram interface {
|
|
prometheus.Histogram
|
|
DurationObserver
|
|
}
|
|
|
|
type histogram struct {
|
|
prometheus.Summary
|
|
}
|
|
|
|
func (h *histogram) ObserveDuration(start time.Time) {
|
|
h.Observe(secondsSince(start))
|
|
}
|