func (s *stats) rusage() *pstats.RusageStats {
	return &pstats.RusageStats{
		UserTime:   proto.Float32(getCpuUsage(s.registry, "rusage.UserTime")),
		SystemTime: proto.Float32(getCpuUsage(s.registry, "rusage.SystemTime")),
		MaxRss:     proto.Int64(getGaugeVal(s.registry, "rusage.MaxRss")),
		InBlock:    proto.Int64(getGaugeVal(s.registry, "rusage.InBlock")),
		OuBlock:    proto.Int64(getGaugeVal(s.registry, "rusage.OuBlock")),
	}
}
func endpointStat(t metrics.Timer) *pstats.EndpointStat {
	return &pstats.EndpointStat{
		Rate1:   proto.Float32(rate(t.Rate1())),
		Rate5:   proto.Float32(rate(t.Rate5())),
		Rate15:  proto.Float32(rate(t.Rate15())),
		Mean:    proto.Float32(milli(t.Mean())),
		StdDev:  proto.Float32(milli(t.StdDev())),
		Upper95: proto.Float32(milli(t.Percentile(0.95))),
	}
}
func endpointSLA(ep Endpoint) *pstats.EndpointSLA {
	return &pstats.EndpointSLA{
		Mean:    proto.Float32(float32(ep.GetMean())),
		Upper95: proto.Float32(float32(ep.GetUpper95())),
	}
}