MCPcopy
hub / github.com/flyteorg/flyte / Timer

Struct Timer

flytestdlib/promutils/scope.go:127–131  ·  view source on GitHub ↗

Timer is a stoppable instance of a StopWatch or a Timer A Timer can only be stopped. On stopping it will output the elapsed duration to prometheus

Source from the content-addressed store, hash-verified

125// Timer is a stoppable instance of a StopWatch or a Timer
126// A Timer can only be stopped. On stopping it will output the elapsed duration to prometheus
127type Timer struct {
128 start time.Time
129 outputScale time.Duration
130 timer prometheus.Observer
131}
132
133// Stop observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch
134func (s Timer) Stop() float64 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected