mapper: remove Batcher interface, rename to Batcher struct
Remove the Batcher interface since there is only one implementation. Rename LockFreeBatcher to Batcher and merge batcher_lockfree.go into batcher.go. Drop type assertions in debug.go now that mapBatcher is a concrete *mapper.Batcher pointer.
This commit is contained in:
parent
9b24a39943
commit
2058343ad6
8 changed files with 1064 additions and 1169 deletions
|
|
@ -148,8 +148,8 @@ func BenchmarkUpdateSentPeers(b *testing.B) {
|
|||
|
||||
// benchBatcher creates a lightweight batcher for benchmarks. Unlike the test
|
||||
// helper, it doesn't register cleanup and suppresses logging.
|
||||
func benchBatcher(nodeCount, bufferSize int) (*LockFreeBatcher, map[types.NodeID]chan *tailcfg.MapResponse) {
|
||||
b := &LockFreeBatcher{
|
||||
func benchBatcher(nodeCount, bufferSize int) (*Batcher, map[types.NodeID]chan *tailcfg.MapResponse) {
|
||||
b := &Batcher{
|
||||
tick: time.NewTicker(1 * time.Hour), // never fires during bench
|
||||
workers: 4,
|
||||
workCh: make(chan work, 4*200),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue