remote tracer: wait a second to accumulate batches
This commit is contained in:
parent
57ea27eef7
commit
2fc5518a00
|
@ -178,11 +178,14 @@ func (t *RemoteTracer) doWrite() {
|
|||
for {
|
||||
_, ok := <-t.ch
|
||||
|
||||
// nil out the buffer to gc events
|
||||
// nil out the buffer to gc events when swapping buffers
|
||||
for i := range buf {
|
||||
buf[i] = nil
|
||||
}
|
||||
|
||||
// wait a bit to accumulate a batch
|
||||
time.Sleep(time.Second)
|
||||
|
||||
t.mx.Lock()
|
||||
tmp := t.buf
|
||||
t.buf = buf[:0]
|
||||
|
|
Loading…
Reference in New Issue