net/udprelay: remove tailscaled_peer_relay_endpoints_total (#18254)
This gauge will be reworked to include endpoint state in future. Updates tailscale/corp#30820 Change-Id: I66f349d89422b46eec4ecbaf1a99ad656c7301f9 Signed-off-by: Alex Valiushko <alexvaliushko@tailscale.com>
This commit is contained in:
@@ -22,20 +22,11 @@ func TestMetrics(t *testing.T) {
|
||||
want := []string{
|
||||
"tailscaled_peer_relay_forwarded_packets_total",
|
||||
"tailscaled_peer_relay_forwarded_bytes_total",
|
||||
"tailscaled_peer_relay_endpoints_total",
|
||||
}
|
||||
slices.Sort(have)
|
||||
slices.Sort(want)
|
||||
c.Assert(have, qt.CmpEquals(), want)
|
||||
|
||||
// Validate addEndpoints.
|
||||
m.addEndpoints(1)
|
||||
c.Assert(m.endpoints.Value(), qt.Equals, int64(1))
|
||||
c.Assert(cMetricEndpoints.Value(), qt.Equals, int64(1))
|
||||
m.addEndpoints(-1)
|
||||
c.Assert(m.endpoints.Value(), qt.Equals, int64(0))
|
||||
c.Assert(cMetricEndpoints.Value(), qt.Equals, int64(0))
|
||||
|
||||
// Validate countForwarded.
|
||||
m.countForwarded(true, true, 1, 1)
|
||||
c.Assert(m.forwarded44Bytes.Value(), qt.Equals, int64(1))
|
||||
|
||||
Reference in New Issue
Block a user