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/util
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
..
cibuild all: use cibuild.On 2 years ago
clientmetric all: fix spelling mistakes 2 years ago
cloudenv all: use syncs.AtomicValue 2 years ago
cmpver util/cmpver: move into OSS from corp repo. 3 years ago
codegen all: convert more code to use net/netip directly 2 years ago
cstruct all: remove old +build tags 2 years ago
deephash tailcfg: add Node.UnsignedPeerAPIOnly to let server mark node as peerapi-only 2 years ago
dirwalk util/dirwalk, metrics, portlist: add new package for fast directory walking 2 years ago
dnsname all: fix spelling mistakes 2 years ago
endian all: remove old +build tags 2 years ago
goroutines ipn/ipnlocal: add c2n /debug/{goroutines,prefs,metrics} 2 years ago
groupmember util/groupmember: remove redundant code (#4298) 2 years ago
hashx util/hashx: move from sha256x (#5388) 2 years ago
jsonutil all: use any instead of interface{} 2 years ago
lineread util/lineread: add docs to Reader 4 years ago
mak all: fix spelling mistakes 2 years ago
multierr all: gofmt for Go 1.19 2 years ago
must util/must: rename Do->Get, add Do 2 years ago
osshare all: remove old +build tags 2 years ago
pidowner all: remove old +build tags 2 years ago
precompress cmd/tsconnect: pre-compress main.wasm when building the NPM package 2 years ago
racebuild all: remove old +build tags 2 years ago
singleflight util/singleflight: sync with upstream 2 years ago
strs util/strs: add new package for string utility funcs 2 years ago
systemd all: remove old +build tags 2 years ago
uniq util/uniq: add ModifySliceFunc (#5504) 2 years ago
winutil all: remove old +build tags 2 years ago