Skip to content

Instantly share code, notes, and snippets.

@marcelcaraciolo
Created March 22, 2013 05:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelcaraciolo/5219187 to your computer and use it in GitHub Desktop.
Save marcelcaraciolo/5219187 to your computer and use it in GitHub Desktop.
...
runner = BenchmarkRunner(suite, '.', 'Cosine benchmarks')
n_benchs, results = runner.run()
print results
#Output:
'{Benchmark('scipy.spatial 0.8.0'):
{'runtime': {'timing': 18.620705604553223, 'repeat': 3, 'success': True, 'loops': 10, 'timeBaselines': 1994.2583385083014, 'units': 'ms'},
'memory': {'usage': 0.09375, 'units': 'MB', 'repeat': 3, 'success': True}},
Benchmark('sklearn 0.13.1'):
{'runtime': {'timing': 0.18474507331848145, 'repeat': 3, 'success': True, 'loops': 1000, 'timeBaselines': 19.786006544973198, 'units': 'ms'},
'memory': {'usage': 0.078125, 'units': 'MB', 'repeat': 3, 'success': True}},
Benchmark('numpy'): {
'runtime': {'timing': 0.0093371582031250011, 'repeat': 3, 'success': True, 'loops': 100000, 'timeBaselines': 1.0, 'units': 'ms'},
'memory': {'usage': 0.01171875, 'units': 'MB', 'repeat': 3, 'success': True}},
Benchmark('nltk.cluster'): {
'runtime': {'timing': 0.010528707504272462, 'repeat': 3, 'success': True, 'loops': 10000, 'timeBaselines': 1.1276136995032031, 'units': 'ms'},
'memory': {'usage': 0.01171875, 'units': 'MB', 'repeat': 3, 'success': True}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment