[Erp5-report] r16807 - /erp5/trunk/products/ERP5Type/Tool/CacheTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Oct 3 17:35:51 CEST 2007


Author: ivan
Date: Wed Oct  3 17:35:51 2007
New Revision: 16807

URL: http://svn.erp5.org?rev=16807&view=rev
Log:
Do not generate 'report', return python objects which are explanatory enough 
(this information is for developers only)

Modified:
    erp5/trunk/products/ERP5Type/Tool/CacheTool.py

Modified: erp5/trunk/products/ERP5Type/Tool/CacheTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Tool/CacheTool.py?rev=16807&r1=16806&r2=16807&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Tool/CacheTool.py (original)
+++ erp5/trunk/products/ERP5Type/Tool/CacheTool.py Wed Oct  3 17:35:51 2007
@@ -219,13 +219,12 @@
         Note: this method will calculate RAM memory usage for 'local'
         (RamCache) cache plugins and will not include 
         'shared' (DistributedRamCache and SQLCache) cache plugins."""
-    report = ''        
+    stats = {}
     total_size = 0
     ram_cache_root = self.getRamCacheRoot()
     for cf_key, cf_value in ram_cache_root.items():
       for cp in cf_value.getCachePluginList():
         cp_total_size = cp.getCachePluginTotalMemorySize()
         total_size += cp_total_size
-        report += '\n%s:\t%s' %(cf_key, cp_total_size)
-    report += '\nTOTAL = %s' %(total_size)        
-    return '%s;%s' %(total_size, report)
+        stats[cf_key] = cp_total_size
+    return total_size, stats




More information about the Erp5-report mailing list