Commit 2fc5518a authored by vyzo's avatar vyzo

remote tracer: wait a second to accumulate batches

parent 57ea27ee
......@@ -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]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment