Commit Graph

1 Commits

Author SHA1 Message Date
Sigurd Schneider
95ab75790d [tools] Add an averaging script
This script averages numbers output from another script. It is useful
to average over a benchmark that outputs one or more results of the form
  <key> <number> <unit>
key and unit are optional.

For example, if
  $ bch --allow-natives-syntax toNumber.js
outputs
  Number('undefined'):  155763 Kps
  (+'undefined'):  193050 Kps
  parseFloat('undefined'):  23736 Kps
then
  $ avg.py 10 bch --allow-natives-syntax toNumber.js
will output
  [10/10] (+'undefined')         : avg 192,240.40 stddev   6,486.24 (185,529.00 - 206,186.00) Kps
  [10/10] Number('undefined')    : avg 156,990.10 stddev  16,327.56 (144,718.00 - 202,840.00) Kps
  [10/10] parseFloat('undefined'): avg  22,885.80 stddev   1,941.80 ( 17,584.00 -  24,266.00) Kps

Change-Id: I237706da8ade1b152e04084e0189007460d359c5
Reviewed-on: https://chromium-review.googlesource.com/1128747
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54330}
2018-07-09 14:45:42 +00:00