kubernetes/vendor/golang.org/x/net/internal/timeseries/timeseries.go

const timeSeriesNumBuckets

const minuteHourSeriesNumBuckets

var timeSeriesResolutions

var minuteHourSeriesResolutions

type Observable

type Float

// NewFloat returns a Float.
func NewFloat() Observable {}

// String returns the float as a string.
func (f *Float) String() string {}

// Value returns the float's value.
func (f *Float) Value() float64 {}

func (f *Float) Multiply(ratio float64) {}

func (f *Float) Add(other Observable) {}

func (f *Float) Clear() {}

func (f *Float) CopyFrom(other Observable) {}

type Clock

type defaultClock

var defaultClockInstance

func (defaultClock) Time() time.Time {}

type tsLevel

func (l *tsLevel) Clear() {}

func (l *tsLevel) InitLevel(size time.Duration, numBuckets int, f func() Observable) {}

type timeSeries

// init initializes a level according to the supplied criteria.
func (ts *timeSeries) init(resolutions []time.Duration, f func() Observable, numBuckets int, clock Clock) {}

// Clear removes all observations from the time series.
func (ts *timeSeries) Clear() {}

// Add records an observation at the current time.
func (ts *timeSeries) Add(observation Observable) {}

// AddWithTime records an observation at the specified time.
func (ts *timeSeries) AddWithTime(observation Observable, t time.Time) {}

// mergeValue inserts the observation at the specified time in the past into all levels.
func (ts *timeSeries) mergeValue(observation Observable, t time.Time) {}

// mergePendingUpdates applies the pending updates into all levels.
func (ts *timeSeries) mergePendingUpdates() {}

// advance cycles the buckets at each level until the latest bucket in
// each level can hold the time specified.
func (ts *timeSeries) advance(t time.Time) {}

// Latest returns the sum of the num latest buckets from the level.
func (ts *timeSeries) Latest(level, num int) Observable {}

// LatestBuckets returns a copy of the num latest buckets from level.
func (ts *timeSeries) LatestBuckets(level, num int) []Observable {}

// ScaleBy updates observations by scaling by factor.
func (ts *timeSeries) ScaleBy(factor float64) {}

// Range returns the sum of observations added over the specified time range.
// If start or finish times don't fall on bucket boundaries of the same
// level, then return values are approximate answers.
func (ts *timeSeries) Range(start, finish time.Time) Observable {}

// Recent returns the sum of observations from the last delta.
func (ts *timeSeries) Recent(delta time.Duration) Observable {}

// Total returns the total of all observations.
func (ts *timeSeries) Total() Observable {}

// ComputeRange computes a specified number of values into a slice using
// the observations recorded over the specified time period. The return
// values are approximate if the start or finish times don't fall on the
// bucket boundaries at the same level or if the number of buckets spanning
// the range is not an integral multiple of num.
func (ts *timeSeries) ComputeRange(start, finish time.Time, num int) []Observable {}

// RecentList returns the specified number of values in slice over the most
// recent time period of the specified range.
func (ts *timeSeries) RecentList(delta time.Duration, num int) []Observable {}

// extract returns a slice of specified number of observations from a given
// level over a given range.
func (ts *timeSeries) extract(l *tsLevel, start, finish time.Time, num int, results []Observable) {}

// resetObservation clears the content so the struct may be reused.
func (ts *timeSeries) resetObservation(observation Observable) Observable {}

type TimeSeries

// NewTimeSeries creates a new TimeSeries using the function provided for creating new Observable.
func NewTimeSeries(f func() Observable) *TimeSeries {}

// NewTimeSeriesWithClock creates a new TimeSeries using the function provided for creating new Observable and the clock for
// assigning timestamps.
func NewTimeSeriesWithClock(f func() Observable, clock Clock) *TimeSeries {}

type MinuteHourSeries

// NewMinuteHourSeries creates a new MinuteHourSeries using the function provided for creating new Observable.
func NewMinuteHourSeries(f func() Observable) *MinuteHourSeries {}

// NewMinuteHourSeriesWithClock creates a new MinuteHourSeries using the function provided for creating new Observable and the clock for
// assigning timestamps.
func NewMinuteHourSeriesWithClock(f func() Observable, clock Clock) *MinuteHourSeries {}

func (ts *MinuteHourSeries) Minute() Observable {}

func (ts *MinuteHourSeries) Hour() Observable {}

func minTime(a, b time.Time) time.Time {}

func maxTime(a, b time.Time) time.Time {}