Fix stats snapshot creation

This commit is contained in:
Gregory Eremin 2015-10-28 02:27:30 +03:00
parent bd345af332
commit a01ae441bc

View File

@ -152,14 +152,14 @@ func (s *baseStats) String() string {
func (s *baseStats) snapshot() *baseSnapshot { func (s *baseStats) snapshot() *baseSnapshot {
return &baseSnapshot{ return &baseSnapshot{
Timestamp: time.Now().UTC().Unix(), timestamp: time.Now().UTC().Unix(),
ProcessedVal: s.time.Count(), processed: s.time.Count(),
ErrorsVal: s.errors.Count(), errors: s.errors.Count(),
MinVal: round(float64(s.time.Min())/1000000, 6), min: round(float64(s.time.Min())/1000000, 6),
MeanVal: round(s.time.Mean()/1000000, 6), mean: round(s.time.Mean()/1000000, 6),
P95Val: round(s.time.Percentile(0.95)/1000000, 6), p95: round(s.time.Percentile(0.95)/1000000, 6),
MaxVal: round(float64(s.time.Max())/1000000, 6), max: round(float64(s.time.Max())/1000000, 6),
StdDevVal: round(s.time.StdDev()/1000000, 6), stddev: round(s.time.StdDev()/1000000, 6),
} }
} }