tailscale/wgengine
M. J. Fromberger e8be3b7989 wgengine/magicsock,types/logger: add latency logs for initial peer contacts
In order to allow us to measure the performance effects of client-side netmap
caching, both with and without the feature enabled, add logs to record how long
it takes after a client restart or profile switch for the node to establish
contact with peers, relative to the first uncached netmap.

We do this by keeping track of a timestamp when the connection is constructed,
and logging a record for "new" peer contacts that records how long (in
microseconds) it took from the time the peer was recorded as a candidate.  The
message includes whether the contact was via DERP or direct, and whether a
cached netmap was in use at the time.

This builds on and extends the counters from #19699, but here we include new
contacts whether or not a cached netmap is in use, so that we can establish a
baseline for comparison.

Updates #12639
Updates tailscale/projects#27

Change-Id: I4f6d050e221f3881848d05a0425c4a5d1a59294c
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
2026-05-29 14:38:06 -07:00
..
bench wgengine/magicsock: restore SetDERPMap signature, add SetDERPMapWithoutReSTUN 2026-04-29 12:46:15 -07:00
filter all: use Go 1.26 things, run most gofix modernizers 2026-03-06 13:32:03 -08:00
magicsock wgengine/magicsock,types/logger: add latency logs for initial peer contacts 2026-05-29 14:38:06 -07:00
netlog all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netstack wgengine/netstack: stop inject goroutine from leaking in Impl.Start (#19721) 2026-05-13 08:13:40 -07:00
router wgengine/router/osrouter: skip netfilter add-ons when chain setup fails (#19757) 2026-05-15 09:32:30 -04:00
wgcfg wgengine, all: remove LazyWG, use wireguard-go callback API for on-demand peers 2026-04-29 19:46:19 -07:00
wgint all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
wglog all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
winnet all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
mem_ios.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen_omit.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
pendopen.go all: use bart.Lite instead of bart.Table where appropriate 2026-03-24 14:45:23 +00:00
userspace_ext_test.go all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
userspace_test.go cmd/cloner: preserve nil-valued entries when cloning map (#19749) 2026-05-14 10:30:59 -04:00
userspace.go control/controlknobs,net/{batching,tstun},wgengine: add nodecaps to disable UDP & TUN GRO/GSO 2026-05-27 17:10:14 -07:00
wgengine.go wgengine, all: remove LazyWG, use wireguard-go callback API for on-demand peers 2026-04-29 19:46:19 -07:00