MCPcopy
hub / github.com/grafana/tempo / reportQueueLength

Method reportQueueLength

tempodb/pool/pool.go:158–171  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

156}
157
158func (p *Pool) reportQueueLength() {
159 ticker := time.NewTicker(queueLengthReportDuration)
160 go func() {
161 defer ticker.Stop()
162 for {
163 select {
164 case <-ticker.C:
165 metricQueryQueueLength.Set(float64(p.size.Load()))
166 case <-p.shutdownCh:
167 return
168 }
169 }
170 }()
171}
172
173func runJob(job *job) {
174 defer job.wg.Done()

Callers 1

NewPoolFunction · 0.95

Calls 2

StopMethod · 0.65
SetMethod · 0.65

Tested by

no test coverage detected