Commit 6b0a1df5 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

revert unrelated change in r.27287, sorry.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27322 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ffca48a9
...@@ -190,7 +190,7 @@ return result ...@@ -190,7 +190,7 @@ return result
py_script_id = "testCachedMethod" py_script_id = "testCachedMethod"
py_script_obj = getattr(portal, py_script_id) py_script_obj = getattr(portal, py_script_id)
for cf_name in ('ram_cache_factory', for cf_name in ('ram_cache_factory',
# 'distributed_ram_cache_factory', 'distributed_ram_cache_factory',
'sql_cache_factory', 'sql_cache_factory',
'zodb_cache_factory',): 'zodb_cache_factory',):
my_cache = CachingMethod(py_script_obj, my_cache = CachingMethod(py_script_obj,
...@@ -229,8 +229,7 @@ return result ...@@ -229,8 +229,7 @@ return result
## 2nd call - should be cached now ## 2nd call - should be cached now
start = time.time() start = time.time()
for i in xrange(100): cached = my_cache(nb_iterations, portal_path=('', portal.getId()))
cached = my_cache(nb_iterations, portal_path=('', portal.getId()))
end = time.time() end = time.time()
calculation_time = end-start calculation_time = end-start
print "\n\tCalculation time (2nd call)", calculation_time print "\n\tCalculation time (2nd call)", calculation_time
......
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