Skip to content

Commit

Permalink
Print the number of data points as one of the stats.
Browse files Browse the repository at this point in the history
  • Loading branch information
tohojo committed Dec 15, 2012
1 parent ef7826a commit fbf777a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions netperf_wrapper/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,16 @@ def format(self, results):
continue
cs = self.np.cumsum(d)
units = settings.DATA_SETS[s]['units']
self.output.write(" Data points: %d\n" % len(d))
if units != "ms":
self.output.write(" Total: %f %s\n" % (cs[-1]*r.meta('STEP_SIZE'),
self.output.write(" Total: %f %s\n" % (cs[-1]*r.meta('STEP_SIZE'),
units.replace("/s", "")))
self.output.write(" Mean: %f %s\n" % (self.np.mean(d), units))
self.output.write(" Median: %f %s\n" % (self.np.median(d), units))
self.output.write(" Min: %f %s\n" % (self.np.min(d), units))
self.output.write(" Max: %f %s\n" % (self.np.max(d), units))
self.output.write(" Std dev: %f\n" % (self.np.std(d)))
self.output.write(" Variance: %f\n" % (self.np.var(d)))
self.output.write(" Mean: %f %s\n" % (self.np.mean(d), units))
self.output.write(" Median: %f %s\n" % (self.np.median(d), units))
self.output.write(" Min: %f %s\n" % (self.np.min(d), units))
self.output.write(" Max: %f %s\n" % (self.np.max(d), units))
self.output.write(" Std dev: %f\n" % (self.np.std(d)))
self.output.write(" Variance: %f\n" % (self.np.var(d)))


class PlotFormatter(Formatter):
Expand Down

0 comments on commit fbf777a

Please sign in to comment.