tailscale/portlist
Brad Fitzpatrick 35bee36549 portlist: use win32 calls instead of running netstat process [windows]
Turns out using win32 instead of shelling out to child processes is a
bit faster:

    name                  old time/op    new time/op    delta
    GetListIncremental-4     278ms ± 2%       0ms ± 7%  -99.93%  (p=0.000 n=8+10)

    name                  old alloc/op   new alloc/op   delta
    GetListIncremental-4     238kB ± 0%       9kB ± 0%  -96.12%  (p=0.000 n=10+8)

    name                  old allocs/op  new allocs/op  delta
    GetListIncremental-4     1.19k ± 0%     0.02k ± 0%  -98.49%  (p=0.000 n=10+10)

Fixes #3876 (sadly)

Change-Id: I1195ac5de21a8a8b3cdace5871d263e81aa27e91
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-10-25 10:55:25 -07:00
..
clean_test.go portlist: normalise space delimited process names (#5634) 2022-09-15 12:17:31 +02:00
clean.go portlist: normalise space delimited process names (#5634) 2022-09-15 12:17:31 +02:00
netstat_exec.go portlist: use win32 calls instead of running netstat process [windows] 2022-10-25 10:55:25 -07:00
netstat_test.go portlist: refactor, introduce OS-specific types 2022-10-23 20:29:23 -07:00
netstat.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
poller.go portlist: refactor, introduce OS-specific types 2022-10-23 20:29:23 -07:00
portlist_ios.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
portlist_js.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
portlist_linux_test.go portlist: refactor, introduce OS-specific types 2022-10-23 20:29:23 -07:00
portlist_linux.go portlist: refactor, introduce OS-specific types 2022-10-23 20:29:23 -07:00
portlist_macos.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
portlist_other.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
portlist_test.go portlist: add a test that verifies changes are picked up over time 2022-10-23 22:02:22 -07:00
portlist_windows.go portlist: use win32 calls instead of running netstat process [windows] 2022-10-25 10:55:25 -07:00
portlist.go portlist: refactor, introduce OS-specific types 2022-10-23 20:29:23 -07:00