kubernetes/staging/src/k8s.io/apiserver/pkg/util/flowcontrol/metrics/timing_ratio_histogram.go

type TimingRatioHistogram

type TimingRatioHistogramOpts

type timingRatioHistogramInner

var _

var _

var _

// NewTimingHistogram returns an object which is TimingHistogram-like. However, nothing
// will be measured until the histogram is registered in at least one registry.
func NewTimingRatioHistogram(opts *TimingRatioHistogramOpts) *TimingRatioHistogram {}

// NewTestableTimingHistogram adds injection of the clock
func NewTestableTimingRatioHistogram(nowFunc func() time.Time, opts *TimingRatioHistogramOpts) *TimingRatioHistogram {}

func (trh *timingRatioHistogramInner) Set(numerator float64) {}

func (trh *timingRatioHistogramInner) Add(deltaNumerator float64) {}

func (trh *timingRatioHistogramInner) Sub(deltaNumerator float64) {}

func (trh *timingRatioHistogramInner) Inc() {}

func (trh *timingRatioHistogramInner) Dec() {}

func (trh *timingRatioHistogramInner) SetToCurrentTime() {}

func (trh *timingRatioHistogramInner) SetDenominator(denominator float64) {}

// WithContext allows the normal TimingHistogram metric to pass in context.
// The context is no-op at the current level of development.
func (trh *timingRatioHistogramInner) WithContext(ctx context.Context) RatioedGauge {}

type TimingRatioHistogramVec

var _

var _

// NewTimingHistogramVec constructs a new vector.
// `opts.InitialValue` is the initial ratio, but this applies
// only for the tiny period of time until NewForLabelValuesSafe sets
// the ratio based on the given initial numerator and denominator.
// Thus there is a tiny splinter of time during member construction when
// its underlying TimingHistogram is given the initial numerator rather than
// the initial ratio (which is obviously a non-issue when both are zero).
// Note the difficulties associated with extracting a member
// before registering the vector.
func NewTimingRatioHistogramVec(opts *compbasemetrics.TimingHistogramOpts, labelNames ...string) *TimingRatioHistogramVec {}

// NewTestableTimingHistogramVec adds injection of the clock.
func NewTestableTimingRatioHistogramVec(nowFunc func() time.Time, opts *compbasemetrics.TimingHistogramOpts, labelNames ...string) *TimingRatioHistogramVec {}

func (v *TimingRatioHistogramVec) metrics() Registerables {}

// NewForLabelValuesChecked will return an error if this vec is not hidden and not yet registered
// or there is a syntactic problem with the labelValues.
func (v *TimingRatioHistogramVec) NewForLabelValuesChecked(initialNumerator, initialDenominator float64, labelValues []string) (RatioedGauge, error) {}

// NewForLabelValuesSafe is the same as NewForLabelValuesChecked in cases where that does not
// return an error.  When the unsafe version returns an error due to the vector not being
// registered yet, the safe version returns an object that implements its methods
// by looking up the relevant vector member in each call (thus getting a non-noop after registration).
// In the other error cases the object returned here is a noop.
func (v *TimingRatioHistogramVec) NewForLabelValuesSafe(initialNumerator, initialDenominator float64, labelValues []string) RatioedGauge {}

type noopRatioed

func (noopRatioed) Set(float64)            {}

func (noopRatioed) Add(float64)            {}

func (noopRatioed) Sub(float64)            {}

func (noopRatioed) Inc()                   {}

func (noopRatioed) Dec()                   {}

func (noopRatioed) SetToCurrentTime()      {}

func (noopRatioed) SetDenominator(float64) {}

func (v *TimingRatioHistogramVec) Reset() {}