mirror of
https://github.com/tailscale/tailscale.git
synced 2026-05-05 20:26:47 +02:00
Avery found a bunch of tests that fail with -count=2. Updates tailscale/corp#40176 (tracks making our CI detect them) Change-Id: Ie3e4398070dd92e4fe0146badddf1254749cca20 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Co-authored-by: Avery Pennarun <apenwarr@tailscale.com>
35 lines
1.0 KiB
Go
35 lines
1.0 KiB
Go
// Copyright (c) Tailscale Inc & contributors
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//go:build ts_omit_clientmetrics
|
|
|
|
package clientmetric
|
|
|
|
type Metric struct{}
|
|
|
|
func (*Metric) Add(int64) {}
|
|
func (*Metric) Set(int64) {}
|
|
func (*Metric) Value() int64 { return 0 }
|
|
func (*Metric) Register(expvarInt any) {}
|
|
func (*Metric) UnregisterAll() {}
|
|
|
|
type MetricUpdate struct {
|
|
Name string `json:"name"`
|
|
Type string `json:"type"`
|
|
Value int `json:"value"`
|
|
Op string `json:"op"`
|
|
}
|
|
|
|
func HasPublished(string) bool { panic("unreachable") }
|
|
func EncodeLogTailMetricsDelta() string { return "" }
|
|
func WritePrometheusExpositionFormat(any) {}
|
|
|
|
var zeroMetric Metric
|
|
|
|
func NewCounter(string) *Metric { return &zeroMetric }
|
|
func NewGauge(string) *Metric { return &zeroMetric }
|
|
func NewAggregateCounter(string) *Metric { return &zeroMetric }
|
|
func NewCounterFunc(string, func() int64) *Metric { return &zeroMetric }
|
|
|
|
func ResetForTest(any) {}
|