go/src/runtime/metrics.go

var metricsSema

var metricsInit

var metrics

var sizeClassBuckets

var timeHistBuckets

type metricData

func metricsLock() {}

func metricsUnlock() {}

// initMetrics initializes the metrics map if it hasn't been yet.
//
// metricsSema must be held.
func initMetrics() {}

func compute0(_ *statAggregate, out *metricValue) {}

type metricReader

func (f metricReader) compute(_ *statAggregate, out *metricValue) {}

//go:linkname godebug_registerMetric internal/godebug.registerMetric
func godebug_registerMetric(name string, read func() uint64) {}

type statDep

const heapStatsDep

const sysStatsDep

const cpuStatsDep

const gcStatsDep

const numStatsDeps

type statDepSet

// makeStatDepSet creates a new statDepSet from a list of statDeps.
func makeStatDepSet(deps ...statDep) statDepSet {}

// difference returns set difference of s from b as a new set.
func (s statDepSet) difference(b statDepSet) statDepSet {}

// union returns the union of the two sets as a new set.
func (s statDepSet) union(b statDepSet) statDepSet {}

// empty returns true if there are no dependencies in the set.
func (s *statDepSet) empty() bool {}

// has returns true if the set contains a given statDep.
func (s *statDepSet) has(d statDep) bool {}

type heapStatsAggregate

// compute populates the heapStatsAggregate with values from the runtime.
func (a *heapStatsAggregate) compute() {}

type sysStatsAggregate

// compute populates the sysStatsAggregate with values from the runtime.
func (a *sysStatsAggregate) compute() {}

type cpuStatsAggregate

// compute populates the cpuStatsAggregate with values from the runtime.
func (a *cpuStatsAggregate) compute() {}

type gcStatsAggregate

// compute populates the gcStatsAggregate with values from the runtime.
func (a *gcStatsAggregate) compute() {}

// nsToSec takes a duration in nanoseconds and converts it to seconds as
// a float64.
func nsToSec(ns int64) float64 {}

type statAggregate

// ensure populates statistics aggregates determined by deps if they
// haven't yet been populated.
func (a *statAggregate) ensure(deps *statDepSet) {}

type metricKind

const metricKindBad

const metricKindUint64

const metricKindFloat64

const metricKindFloat64Histogram

type metricSample

type metricValue

// float64HistOrInit tries to pull out an existing float64Histogram
// from the value, but if none exists, then it allocates one with
// the given buckets.
func (v *metricValue) float64HistOrInit(buckets []float64) *metricFloat64Histogram {}

type metricFloat64Histogram

var agg

type metricName

// readMetricNames is the implementation of runtime/metrics.readMetricNames,
// used by the runtime/metrics test and otherwise unreferenced.
//
//go:linkname readMetricNames runtime/metrics_test.runtime_readMetricNames
func readMetricNames() []string {}

// readMetrics is the implementation of runtime/metrics.Read.
//
//go:linkname readMetrics runtime/metrics.runtime_readMetrics
func readMetrics(samplesp unsafe.Pointer, len int, cap int) {}

// readMetricsLocked is the internal, locked portion of readMetrics.
//
// Broken out for more robust testing. metricsLock must be held and
// initMetrics must have been called already.
func readMetricsLocked(samplesp unsafe.Pointer, len int, cap int) {}