Utils: Fix Statistics fix
[senf.git] / senf / Utils / Statistics.cc
index a9cb325..a2363ca 100644 (file)
@@ -81,7 +81,7 @@ senf::StatisticsBase::output(unsigned n)
 }
 
 //
-// generate an engineering style notation i
+// generate an engineering style notation 
 //
 char *format_eng( float f)
 {
@@ -290,7 +290,7 @@ prefix_ void senf::Collector::enter(float min, float avg, float max)
     if (min < accMin_) accMin_ = min;
     if (max > accMax_) accMax_ = max;
     if (++i_ >= rank_) {
-        StatisticsBase::enter(accMin_, accAvg_ / rank_, accMax_);
+        StatisticsBase::enter(accMin_, accAvg_ / i_, accMax_);
         i_ = 0;
         accMin_ = FLT_MAX;
         accAvg_ = 0.0f;