1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
__author__ = 'Calvin'
from pyperform import ComparisonBenchmark, BenchmarkedFunction
@ComparisonBenchmark('Group1', largs=(100,))
def mytest(l):
out = 0.
for i in range(l):
out += i
return out
@ComparisonBenchmark('Group1', largs=(100,))
def mytest2(l):
out = 0.
for i in range(l):
out += i
return out
@BenchmarkedFunction(largs=(5, 2, 10))
def TripleMultiply(a, b, c):
result = a * b * c
return result
with open('report.txt', 'w') as f:
ComparisonBenchmark.summarize('Group1', f)
|