Commit a93d5669 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

fill cache out of the loop, otherwise the test and its result become too different.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30470 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1f120610
......@@ -208,6 +208,8 @@ class TestPerformance(ERP5TypeTestCase, LogInterceptor):
view_result = {}
tic_result = {}
add_result = {}
# call view once to fill caches
self.bar_module.BarModule_viewBarList()
# add object in bar module
for i in xrange(10):
def add():
......@@ -229,8 +231,6 @@ class TestPerformance(ERP5TypeTestCase, LogInterceptor):
self.tic()
after_tic = time()
gc.collect()
# call view once to fill caches
self.bar_module.BarModule_viewBarList()
before_form = time()
for x in xrange(100):
self.bar_module.BarModule_viewBarList()
......
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