| Index: mojo/devtools/common/mojo_benchmark
|
| diff --git a/mojo/devtools/common/mojo_benchmark b/mojo/devtools/common/mojo_benchmark
|
| index 9a4803c78052726e6b084f11e2584cfe5f6d0742..e01ff627d22e63ea5633b9682e801f7b04cf3655 100755
|
| --- a/mojo/devtools/common/mojo_benchmark
|
| +++ b/mojo/devtools/common/mojo_benchmark
|
| @@ -7,6 +7,7 @@
|
|
|
| import argparse
|
| import logging
|
| +import numpy
|
| import sys
|
| import time
|
|
|
| @@ -70,6 +71,16 @@ def _print_benchmark_error(outcome):
|
| print '-' * 72
|
|
|
|
|
| +def _format_vector(results):
|
| + if not len(results):
|
| + return "med -, avg -, std-dev -, (no results)"
|
| +
|
| + return "med %f, avg %f, std-dev %f %s" % (numpy.median(results),
|
| + numpy.mean(results),
|
| + numpy.std(results),
|
| + str(results))
|
| +
|
| +
|
| def _print_results(benchmark_name, variant_name, results, measurements,
|
| aggregate):
|
| print '[ %s ] %s ' % (benchmark_name, variant_name)
|
| @@ -77,7 +88,7 @@ def _print_results(benchmark_name, variant_name, results, measurements,
|
| print ' ' + measurement['name'] + ': ',
|
| if measurement['spec'] in results:
|
| if aggregate:
|
| - print str(results[measurement['spec']])
|
| + print _format_vector(results[measurement['spec']])
|
| else:
|
| if len(results[measurement['spec']]) == 0:
|
| print '?'
|
|
|