tailscale/util
Mihai Parparita f49b9f75b8 util/clientmetric: allow client metric values to be provided by a function
Adds NewGaugeFunc and NewCounterFunc (inspired by expvar.Func) which
change the current value to be reported by a function. This allows
some client metric values to be computed on-demand during uploading (at
most every 15 seconds), instead of being continuously updated.

clientmetric uploading had a bunch of micro-optimizations for memory
access (#3331) which are not possible with this approach. However, any
performance hit from function-based metrics is contained to those metrics
only, and we expect to have very few.

Also adds a DisableDeltas() option for client metrics, so that absolute
values are always reported. This makes server-side processing of some
metrics easier to reason about.

Updates tailscale/corp#9230

Signed-off-by: Mihai Parparita <mihai@tailscale.com>
2023-04-05 17:21:16 -07:00
..
cibuild all: update copyright and license headers 2023-01-27 15:36:29 -08:00
clientmetric util/clientmetric: allow client metric values to be provided by a function 2023-04-05 17:21:16 -07:00
cloudenv all: update copyright and license headers 2023-01-27 15:36:29 -08:00
cmpver all: update copyright and license headers 2023-01-27 15:36:29 -08:00
codegen util/codegen: add -copyright to control presence of copyright headers 2023-03-27 16:33:34 -07:00
cstruct all: update copyright and license headers 2023-01-27 15:36:29 -08:00
deephash tailcfg: add Node.SelfNodeV4MasqAddrForThisPeer 2023-03-23 16:54:12 -07:00
dirwalk all: use tstest.Replace more 2023-03-04 12:24:55 -08:00
dnsname cmd/tailscale: extend hostname validation (#7678) 2023-03-27 18:21:58 +01:00
goroutines all: update copyright and license headers 2023-01-27 15:36:29 -08:00
groupmember all: update copyright and license headers 2023-01-27 15:36:29 -08:00
hashx all: update copyright and license headers 2023-01-27 15:36:29 -08:00
httpm all: update copyright and license headers 2023-01-27 15:36:29 -08:00
jsonutil all: update copyright and license headers 2023-01-27 15:36:29 -08:00
lineread all: update copyright and license headers 2023-01-27 15:36:29 -08:00
linuxfw util/linuxfw: add build constraints excluding GOARCH=arm 2023-02-14 06:00:03 +00:00
mak all: update copyright and license headers 2023-01-27 15:36:29 -08:00
multierr util/multierr: implement Go 1.20+'s multiple error Unwrap 2023-02-02 14:03:51 -05:00
must all: update copyright and license headers 2023-01-27 15:36:29 -08:00
osshare all: update copyright and license headers 2023-01-27 15:36:29 -08:00
pidowner all: update copyright and license headers 2023-01-27 15:36:29 -08:00
precompress all: update copyright and license headers 2023-01-27 15:36:29 -08:00
quarantine all: update copyright and license headers 2023-01-27 15:36:29 -08:00
racebuild all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ringbuffer util/ringbuffer: move generic ringbuffer from corp repo 2023-02-21 19:11:08 +00:00
set all: update copyright and license headers 2023-01-27 15:36:29 -08:00
singleflight all: update copyright and license headers 2023-01-27 15:36:29 -08:00
slicesx util/slicesx: add package for generic slice functions, use 2023-03-03 16:25:48 -05:00
sysresources util/sysresources, magicsock: scale DERP buffer based on system memory 2023-04-03 17:14:14 -04:00
systemd all: update copyright and license headers 2023-01-27 15:36:29 -08:00
truncate util: add truncate package (#7490) 2023-03-07 11:51:36 -08:00
uniq all: update copyright and license headers 2023-01-27 15:36:29 -08:00
vizerror util/vizerror: add As function to get wrapped Error 2023-02-01 14:39:13 -08:00
winutil ipn/ipnlocal, util/winutil/policy: modify Windows profile migration to load legacy prefs from within tailscaled 2023-04-03 14:41:46 -07:00