MCPcopy Index your code
hub / github.com/coder/coder / sendTelemetryBatch

Method sendTelemetryBatch

tailnet/service.go:345–354  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343}
344
345func (b *NetworkTelemetryBatcher) sendTelemetryBatch() {
346 b.mu.Lock()
347 defer b.mu.Unlock()
348 events := b.pending
349 if len(events) == 0 {
350 return
351 }
352 b.pending = []*proto.TelemetryEvent{}
353 b.batchFn(events)
354}
355
356func (b *NetworkTelemetryBatcher) start() {
357 b.ticker = b.clock.NewTicker(b.frequency)

Callers 1

startMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected