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

Method Stop

flytestdlib/promutils/scope.go:134–144  ·  view source on GitHub ↗

Stop observes the elapsed duration since the creation of the timer. The timer is created using a StopWatch

()

Source from the content-addressed store, hash-verified

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 {
135 observed := time.Since(s.start).Nanoseconds()
136 outputScaleDuration := s.outputScale.Nanoseconds()
137 if outputScaleDuration == 0 {
138 s.timer.Observe(0)
139 return 0
140 }
141 scaled := float64(observed) / float64(outputScaleDuration)
142 s.timer.Observe(scaled)
143 return scaled
144}
145
146// A SummaryOptions represents a set of options that can be supplied when creating a new prometheus summary metric
147type SummaryOptions struct {

Callers 2

enqueueLoopMethod · 0.95
enqueueLoopMethod · 0.95

Implementers 8

GoCronSchedulerruns/scheduler/core/scheduler.go
AppK8sClientapp/internal/k8s/app_client.go
mockAppK8sClientapp/internal/service/internal_app_serv
APITimerflytestdlib/metrics/crud.go
OperationTimerflytestdlib/metrics/crud.go
Timerflytestdlib/promutils/scope.go
fakeTimerflytestdlib/promutils/labeled/timer_wr
timerflytestdlib/promutils/labeled/timer_wr

Calls 1

ObserveMethod · 0.45

Tested by

no test coverage detected