You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd
Brad Fitzpatrick db2cc393af util/dirwalk, metrics, portlist: add new package for fast directory walking
This is similar to the golang.org/x/tools/internal/fastwalk I'd
previously written but not recursive and using mem.RO.

The metrics package already had some Linux-specific directory reading
code in it. Move that out to a new general package that can be reused
by portlist too, which helps its scanning of all /proc files:

    name                old time/op    new time/op    delta
    FindProcessNames-8    2.79ms ± 6%    2.45ms ± 7%  -12.11%  (p=0.000 n=10+10)

    name                old alloc/op   new alloc/op   delta
    FindProcessNames-8    62.9kB ± 0%    33.5kB ± 0%  -46.76%  (p=0.000 n=9+10)

    name                old allocs/op  new allocs/op  delta
    FindProcessNames-8     2.25k ± 0%     0.38k ± 0%  -82.98%  (p=0.000 n=9+10)

Change-Id: I75db393032c328f12d95c39f71c9742c375f207a
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2 years ago
..
addlicense cmd/addlicense: add command to add licenseheaders to generated code 3 years ago
cloner cmd/{cloner,viewer}: add support for map values with pointers 2 years ago
containerboot all: remove old +build tags 2 years ago
derper util/dirwalk, metrics, portlist: add new package for fast directory walking 2 years ago
derpprobe net/stun: convert to use net/netip.AddrPort 2 years ago
gitops-pusher cmd/gitops-pusher: standardize hujson before posting to validate (#5525) 2 years ago
hello refactor: move from io/ioutil to io and os packages 2 years ago
mkpkg cmd/mkpkg: use package flag (#4373) 2 years ago
netlogfmt cmd/netlogfmt: handle any stream of network logs (#6108) 2 years ago
nginx-auth cmd/nginx-auth: add experimental status badge to README 2 years ago
pgproxy cmd/pgproxy: link to blog post at the top. 2 years ago
printdep Docker: add ALPINE.txt to manage alpine versions 2 years ago
proxy-to-grafana all: gofmt for Go 1.19 2 years ago
speedtest net/speedtest: retune to meet iperf on localhost in a VM 2 years ago
ssh-auth-none-demo ssh/tailssh: add password-forcing workaround for buggy SSH clients 2 years ago
tailscale util/dirwalk, metrics, portlist: add new package for fast directory walking 2 years ago
tailscaled util/dirwalk, metrics, portlist: add new package for fast directory walking 2 years ago
testcontrol all: use any instead of interface{} 2 years ago
tsconnect cmd/tsconnect: fix null pointer dereference when DNS lookups fail 2 years ago
tsshd all: remove old +build tags 2 years ago
viewer all: fix spelling mistakes 2 years ago