Example #1
0
// Get max, average, and 90p from existing samples.
func (self *resource) GetPercentile() info.Percentiles {
	p := info.Percentiles{}
	p.Mean = uint64(self.mean.Mean)
	p.Max = self.max
	p.Ninety = self.samples.Get90Percentile()
	p.Present = true
	return p
}
Example #2
0
// Get max, average, and 90p from existing samples.
func (self *resource) GetAllPercentiles() info.Percentiles {
	p := info.Percentiles{}
	p.Mean = uint64(self.mean.Mean)
	p.Max = self.max
	p.Fifty = self.samples.GetPercentile(0.5)
	p.Ninety = self.samples.GetPercentile(0.9)
	p.NinetyFive = self.samples.GetPercentile(0.95)
	p.Present = true
	return p
}