kubernetes/vendor/github.com/google/cadvisor/summary/percentiles.go

const secondsToMilliSeconds

const milliSecondsToNanoSeconds

const secondsToNanoSeconds

type Uint64Slice

func (s Uint64Slice) Len() int           {}

func (s Uint64Slice) Swap(i, j int)      {}

func (s Uint64Slice) Less(i, j int) bool {}

// Get percentile of the provided samples. Round to integer.
func (s Uint64Slice) GetPercentile(d float64) uint64 {}

type mean

func (m *mean) Add(value uint64) {}

type Percentile

type resource

// Adds a new percentile sample.
func (r *resource) Add(p info.Percentiles) {}

// Add a single sample. Internally, we convert it to a fake percentile sample.
func (r *resource) AddSample(val uint64) {}

// Get max, average, and 90p from existing samples.
func (r *resource) GetAllPercentiles() info.Percentiles {}

func NewResource(size int) Percentile {}

// Return aggregated percentiles from the provided percentile samples.
func GetDerivedPercentiles(stats []*info.Usage) info.Usage {}

// Calculate part of a minute this sample set represent.
func getPercentComplete(stats []*secondSample) (percent int32) {}

// Calculate cpurate from two consecutive total cpu usage samples.
func getCPURate(latest, previous secondSample) (uint64, error) {}

// Returns a percentile sample for a minute by aggregating seconds samples.
func GetMinutePercentiles(stats []*secondSample) info.Usage {}