drop in a logger

This commit is contained in:
JackDoan
2026-05-11 17:10:05 -05:00
parent 2a47b47853
commit 0ff28504d7
6 changed files with 65 additions and 53 deletions

View File

@@ -6,6 +6,7 @@ import (
"testing"
"github.com/slackhq/nebula/overlay/tio"
"github.com/slackhq/nebula/test"
)
// nopTunWriter is a zero-alloc tio.GSOWriter for benchmarks. Discards
@@ -70,7 +71,7 @@ func buildICMPv4() []byte {
// between batches, and reports per-packet cost.
func runCommitBench(b *testing.B, pkts [][]byte, batchSize int) {
b.Helper()
c := NewTCPCoalescer(nopTunWriter{})
c := NewTCPCoalescer(nopTunWriter{}, test.NewLogger())
b.ReportAllocs()
b.SetBytes(int64(len(pkts[0])))
b.ResetTimer()
@@ -139,7 +140,7 @@ func BenchmarkCommitNonCoalesceableTCP(b *testing.B) {
// is the bench that shows the savings of skipping the lane's re-parse.
func runMultiCommitBench(b *testing.B, pkts [][]byte, batchSize int) {
b.Helper()
m := NewMultiCoalescer(nopTunWriter{}, true, true)
m := NewMultiCoalescer(nopTunWriter{}, test.NewLogger(), true, true)
b.ReportAllocs()
b.SetBytes(int64(len(pkts[0])))
b.ResetTimer()