Commit 0d147f80 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make a profile report for each iteration.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24963 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b975b47d
......@@ -140,8 +140,8 @@ class TestPerformance(ERP5TypeTestCase, LogInterceptor):
self.failUnless(min < req_time < max,
'%.4f < %.4f < %.4f' % (min, req_time, max))
def profile(self, func):
prof_file = func.__name__
def profile(self, func, suffix=''):
prof_file = '%s%s' % (func.__name__, suffix)
try:
os.unlink(prof_file)
except OSError:
......@@ -209,8 +209,8 @@ class TestPerformance(ERP5TypeTestCase, LogInterceptor):
tic_result[key] = (after_tic - before_tic)/100.
add_result[key] = (after_add - before_add)/100.
if PROFILE:
self.profile(self.bar_module.BarModule_viewBarList)
if PROFILE:
self.profile(self.bar_module.BarModule_viewBarList, i)
keys = view_result.keys()
keys.sort()
# first display results
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment