a simple benchmark utility.
git clone https://github.com/napman/easy_bench.git
or
wget https://raw.githubusercontent.com/napman/easy_bench/master/bench.py
from easy_bench.bench import * # or just "from bench import *" if you installed with wget.
with bench("some_process"):
some_process()
That's it. it makes a file "benchmark.log" and stores benchmark
bench = Bench("some_process")
some_process()
bench.end()
set_logfile("another_logfile_name")
"sum.py" sums up the logs and show the summary
$ sum.py [logfile]
it's useful when you took a benchmark with loops like;
for i in xrange(1000):
with bench("some_process"):
some_process()