go/src/runtime/metrics_test.go

func prepareAllMetricsSamples() (map[string]metrics.Description, []metrics.Sample) {}

func TestReadMetrics(t *testing.T) {}

func TestReadMetricsConsistency(t *testing.T) {}

func BenchmarkReadMetricsLatency(b *testing.B) {}

var readMetricsSink

func TestReadMetricsCumulative(t *testing.T) {}

func withinEpsilon(v1, v2, e float64) bool {}

func TestMutexWaitTimeMetric(t *testing.T) {}

type locker2

type mutex

func (m *mutex) Lock1()   {}

func (m *mutex) Unlock1() {}

func (m *mutex) Lock2()   {}

func (m *mutex) Unlock2() {}

type rwmutexWrite

func (m *rwmutexWrite) Lock1()   {}

func (m *rwmutexWrite) Unlock1() {}

func (m *rwmutexWrite) Lock2()   {}

func (m *rwmutexWrite) Unlock2() {}

type rwmutexReadWrite

func (m *rwmutexReadWrite) Lock1()   {}

func (m *rwmutexReadWrite) Unlock1() {}

func (m *rwmutexReadWrite) Lock2()   {}

func (m *rwmutexReadWrite) Unlock2() {}

type rwmutexWriteRead

func (m *rwmutexWriteRead) Lock1()   {}

func (m *rwmutexWriteRead) Unlock1() {}

func (m *rwmutexWriteRead) Lock2()   {}

func (m *rwmutexWriteRead) Unlock2() {}

// generateMutexWaitTime causes a couple of goroutines
// to block a whole bunch of times on a sync.Mutex, returning
// the minimum amount of time that should be visible in the
// /sync/mutex-wait:seconds metric.
func generateMutexWaitTime(mu locker2) time.Duration {}

// See issue #60276.
func TestCPUMetricsSleep(t *testing.T) {}

// Call f() and verify that the correct STW metrics increment. If isGC is true,
// fn triggers a GC STW. Otherwise, fn triggers an other STW.
func testSchedPauseMetrics(t *testing.T, fn func(t *testing.T), isGC bool) {}

func TestSchedPauseMetrics(t *testing.T) {}

func TestRuntimeLockMetricsAndProfile(t *testing.T) {}

type contentionWorker

func (w *contentionWorker) run() {}

func TestCPUStats(t *testing.T) {}

func TestMetricHeapUnusedLargeObjectOverflow(t *testing.T) {}