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/net
Will Norris 7c386ca6d2 net/sockstats: fix calculation of radio power usage
When splitting the radio monitor usage array, we were splitting at now %
3600 to get values into chronological order.  This caused the value for
the final second to be included at the beginning of the ordered slice
rather than the end.  If there was activity during that final second, an
extra five seconds of high power usage would get recorded in some cases.
This could result in a final calculation of greater than 100% usage.

This corrects that by splitting values at (now+1 % 3600).

This also simplifies the percentage calculation by always rounding
values down, which is sufficient for our usage.

Signed-off-by: Will Norris <will@tailscale.com>
1 year ago
..
art net/art: skip tests on CI for now 1 year ago
connstats net/connstats: exclude traffic with internal Tailscale service (#7904) 1 year ago
dns various: add golangci-lint, fix issues (#7905) 1 year ago
dnscache tstest: add method to Replace values for tests 2 years ago
dnsfallback net/dnsfallback: more explicitly pass through logf function 1 year ago
flowtrack all: update copyright and license headers 2 years ago
interfaces net/netns: don't log errors when we can't get the default route on Darwin 1 year ago
memnet net/memnet: rename from net/nettest 2 years ago
netaddr all: update copyright and license headers 2 years ago
netcheck net/netcheck: reenable TestNodeAddrResolve on Windows 1 year ago
neterror net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 2 years ago
netknob all: update copyright and license headers 2 years ago
netns net/netns: don't log errors when we can't get the default route on Darwin 1 year ago
netstat net/{netns,netstat}: use new x/sys/cpu.IsBigEndian 2 years ago
netutil all: replace /kb/ links with /s/ equivalents 2 years ago
packet net, wgengine/capture: encode NAT addresses in pcap stream 2 years ago
ping all: update copyright and license headers 2 years ago
portmapper various: add golangci-lint, fix issues (#7905) 1 year ago
proxymux all: update copyright and license headers 2 years ago
routetable net/routetable: include unknown flags in the routetable doctor output 2 years ago
socks5 net/socks5: add password auth support 2 years ago
sockstats net/sockstats: fix calculation of radio power usage 1 year ago
speedtest all: update copyright and license headers 2 years ago
stun wgengine/magicsock, types/nettype, etc: finish ReadFromUDPAddrPort netip migration 1 year ago
tlsdial health, net/tlsdial: add healthcheck for self-signed cert 2 years ago
tsaddr all: replace /kb/ links with /s/ equivalents 2 years ago
tsdial various: add golangci-lint, fix issues (#7905) 1 year ago
tshttpproxy net/tshttpproxy: don't proxy through ourselves 2 years ago
tstun tailcfg: make SelfNodeV4MasqAddrForThisPeer a pointer 1 year ago
wsconn all: update copyright and license headers 2 years ago