defaultQueueMetrics expects the caller to lock before setting any metrics.
| 71 | |
| 72 | // defaultQueueMetrics expects the caller to lock before setting any metrics. |
| 73 | type defaultQueueMetrics struct { |
| 74 | clock clock.Clock |
| 75 | |
| 76 | // current depth of a workqueue |
| 77 | depth GaugeMetric |
| 78 | // total number of adds handled by a workqueue |
| 79 | adds CounterMetric |
| 80 | // how long an item stays in a workqueue |
| 81 | latency HistogramMetric |
| 82 | // how long processing an item from a workqueue takes |
| 83 | workDuration HistogramMetric |
| 84 | addTimes map[t]time.Time |
| 85 | processingStartTimes map[t]time.Time |
| 86 | |
| 87 | // how long have current threads been working? |
| 88 | unfinishedWorkSeconds SettableGaugeMetric |
| 89 | longestRunningProcessor SettableGaugeMetric |
| 90 | |
| 91 | // TODO(danielqsj): Remove the following metrics, they are deprecated |
| 92 | deprecatedDepth GaugeMetric |
| 93 | deprecatedAdds CounterMetric |
| 94 | deprecatedLatency SummaryMetric |
| 95 | deprecatedWorkDuration SummaryMetric |
| 96 | deprecatedUnfinishedWorkSeconds SettableGaugeMetric |
| 97 | deprecatedLongestRunningProcessor SettableGaugeMetric |
| 98 | } |
| 99 | |
| 100 | func (m *defaultQueueMetrics) add(item t) { |
| 101 | if m == nil { |
nothing calls this directly
no outgoing calls
no test coverage detected