MCPcopy
hub / github.com/prometheus/prometheus / start

Method start

tsdb/chunks/chunk_write_queue.go:113–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111}
112
113func (c *chunkWriteQueue) start() {
114 c.workerWg.Go(func() {
115 for {
116 job, ok := c.jobs.pop()
117 if !ok {
118 return
119 }
120
121 c.processJob(job)
122 }
123 })
124
125 c.isRunningMtx.Lock()
126 c.isRunning = true
127 c.isRunningMtx.Unlock()
128}
129
130func (c *chunkWriteQueue) processJob(job chunkWriteJob) {
131 err := c.writeChunk(job.seriesRef, job.mint, job.maxt, job.chk, job.ref, job.isOOO, job.cutFile)

Callers 1

newChunkWriteQueueFunction · 0.95

Calls 3

processJobMethod · 0.95
LockMethod · 0.80
popMethod · 0.45

Tested by

no test coverage detected