mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-01 23:31:51 +00:00
add longest_running_processor_microseconds metric
Kubernetes-commit: fd77aa5a41bbce7490dd4538c0d5743cb59b2be4
This commit is contained in:
committed by
Kubernetes Publisher
parent
cc2731ad7e
commit
952b05be23
@@ -94,6 +94,7 @@ type testMetricsProvider struct {
|
||||
latency testMetric
|
||||
duration testMetric
|
||||
unfinished testMetric
|
||||
longest testMetric
|
||||
retries testMetric
|
||||
}
|
||||
|
||||
@@ -117,6 +118,10 @@ func (m *testMetricsProvider) NewUnfinishedWorkSecondsMetric(name string) Settab
|
||||
return &m.unfinished
|
||||
}
|
||||
|
||||
func (m *testMetricsProvider) NewLongestRunningProcessorMicrosecondsMetric(name string) SettableGaugeMetric {
|
||||
return &m.longest
|
||||
}
|
||||
|
||||
func (m *testMetricsProvider) NewRetriesMetric(name string) CounterMetric {
|
||||
return &m.retries
|
||||
}
|
||||
@@ -232,6 +237,9 @@ func TestMetrics(t *testing.T) {
|
||||
if e, a := .001, mp.unfinished.gaugeValue(); e != a {
|
||||
t.Errorf("expected %v, got %v", e, a)
|
||||
}
|
||||
if e, a := 1000.0, mp.longest.gaugeValue(); e != a {
|
||||
t.Errorf("expected %v, got %v", e, a)
|
||||
}
|
||||
|
||||
// Finish that one up
|
||||
q.Done(i)
|
||||
|
Reference in New Issue
Block a user