tailscale/portlist
Brad Fitzpatrick 774fa72d32 portlist: add BenchmarkGetListIncremental
In contrast to BenchmarkGetList, this new BenchmarkGetListIncremental
acts like what happens in practice, remembering the previous run and
avoiding work that's already been done previously.

Currently:

    BenchmarkGetList
    BenchmarkGetList-8                           100          11011100 ns/op           68411 B/op       2211 allocs/op
    BenchmarkGetList-8                           100          11443410 ns/op           69073 B/op       2223 allocs/op
    BenchmarkGetList-8                           100          11217311 ns/op           68421 B/op       2197 allocs/op
    BenchmarkGetList-8                           100          11035559 ns/op           68801 B/op       2220 allocs/op
    BenchmarkGetList-8                           100          10921596 ns/op           69226 B/op       2225 allocs/op
    BenchmarkGetListIncremental
    BenchmarkGetListIncremental-8                168           7187217 ns/op            1192 B/op         28 allocs/op
    BenchmarkGetListIncremental-8                172           7004525 ns/op            1194 B/op         28 allocs/op
    BenchmarkGetListIncremental-8                162           7235889 ns/op            1221 B/op         29 allocs/op
    BenchmarkGetListIncremental-8                164           7035671 ns/op            1219 B/op         29 allocs/op
    BenchmarkGetListIncremental-8                174           7095448 ns/op            1114 B/op         27 allocs/op

Updates #5958

Change-Id: I1bd5a4b206df4173e2cb8e8a780429d9daa6ef1d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2022-10-22 20:52:28 -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: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
netstat_test.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
netstat.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
poller.go portlist: unexport all Poller fields, removing unused one, rework channels 2022-10-22 05:47:34 -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: further reduce allocations on Linux 2022-10-22 10:50:51 -07:00
portlist_linux.go portlist: remove unix.Readlink allocs on Linux 2022-10-22 11:30:53 -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 BenchmarkGetListIncremental 2022-10-22 20:52:28 -07:00
portlist_windows.go portlist: update some internals to use append-style APIs 2022-10-21 22:26:37 -07:00
portlist.go portlist: further reduce allocations on Linux 2022-10-22 10:50:51 -07:00