headscale/hscontrol/mapper
Kristoffer Dalby 21e02e5d1f mapper/batcher: add unit tests and benchmarks
Add comprehensive unit tests for the LockFreeBatcher covering
AddNode/RemoveNode lifecycle, addToBatch routing (broadcast, targeted,
full update), processBatchedChanges deduplication, cleanup of offline
nodes, close/shutdown behavior, IsConnected state tracking, and
connected map consistency.

Add benchmarks for connection entry send, multi-channel send and
broadcast, peer diff computation, sentPeers updates, addToBatch at
various scales (10/100/1000 nodes), processBatchedChanges, broadcast
delivery, IsConnected lookups, connected map enumeration, connection
churn, and concurrent send+churn scenarios.

Widen setupBatcherWithTestData to accept testing.TB so benchmarks can
reuse the same database-backed test setup as unit tests.
2026-03-14 02:52:28 -07:00
..
batcher.go poll: stop stale map sessions through an explicit teardown hook 2026-03-12 01:27:34 -07:00
batcher_bench_test.go mapper/batcher: add unit tests and benchmarks 2026-03-14 02:52:28 -07:00
batcher_lockfree.go poll: stop stale map sessions through an explicit teardown hook 2026-03-12 01:27:34 -07:00
batcher_test.go mapper/batcher: add unit tests and benchmarks 2026-03-14 02:52:28 -07:00
batcher_unit_test.go mapper/batcher: add unit tests and benchmarks 2026-03-14 02:52:28 -07:00
builder.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
builder_test.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
mapper.go all: fix golangci-lint issues (#3064) 2026-02-06 21:45:32 +01:00
mapper_test.go all: upgrade to Go 1.26rc2 and modernize codebase 2026-02-08 12:35:23 +01:00
tail_test.go all: upgrade to Go 1.26rc2 and modernize codebase 2026-02-08 12:35:23 +01:00