Commit 1f8b8405 authored by Ivan Tyagov's avatar Ivan Tyagov

Do not generate 'report', return python objects which are explanatory enough

(this information is for developers only)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16807 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5e44a55c
...@@ -219,13 +219,12 @@ class CacheTool(BaseTool): ...@@ -219,13 +219,12 @@ class CacheTool(BaseTool):
Note: this method will calculate RAM memory usage for 'local' Note: this method will calculate RAM memory usage for 'local'
(RamCache) cache plugins and will not include (RamCache) cache plugins and will not include
'shared' (DistributedRamCache and SQLCache) cache plugins.""" 'shared' (DistributedRamCache and SQLCache) cache plugins."""
report = '' stats = {}
total_size = 0 total_size = 0
ram_cache_root = self.getRamCacheRoot() ram_cache_root = self.getRamCacheRoot()
for cf_key, cf_value in ram_cache_root.items(): for cf_key, cf_value in ram_cache_root.items():
for cp in cf_value.getCachePluginList(): for cp in cf_value.getCachePluginList():
cp_total_size = cp.getCachePluginTotalMemorySize() cp_total_size = cp.getCachePluginTotalMemorySize()
total_size += cp_total_size total_size += cp_total_size
report += '\n%s:\t%s' %(cf_key, cp_total_size) stats[cf_key] = cp_total_size
report += '\nTOTAL = %s' %(total_size) return total_size, stats
return '%s;%s' %(total_size, report)
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