mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-23 00:44:25 +01:00
instruments
This commit is contained in:
@@ -347,6 +347,8 @@ func (f *Interface) listenInBatch(reader io.ReadWriteCloser, batchReader BatchRe
|
||||
|
||||
conntrackCache := firewall.NewConntrackCacheTicker(f.conntrackCacheTimeout)
|
||||
|
||||
tunBatchHist := metrics.GetOrRegisterHistogram("batch.tun_read_size", nil, metrics.NewUniformSample(1024))
|
||||
|
||||
for {
|
||||
n, err := batchReader.BatchRead(bufs, sizes)
|
||||
if err != nil {
|
||||
@@ -359,6 +361,8 @@ func (f *Interface) listenInBatch(reader io.ReadWriteCloser, batchReader BatchRe
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
tunBatchHist.Update(int64(n))
|
||||
|
||||
// Process all packets in the batch at once
|
||||
f.consumeInsidePackets(bufs, sizes, n, outs, i, conntrackCache.Get(f.l), &batchPackets, &batchAddrs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user