[pypy-svn] r79478 - in pypy/trunk/pypy/jit/tool: . test

antocuni at codespeak.net antocuni at codespeak.net
Wed Nov 24 17:18:38 CET 2010


Author: antocuni
Date: Wed Nov 24 17:18:36 2010
New Revision: 79478

Modified:
   pypy/trunk/pypy/jit/tool/log-template.gnumeric
   pypy/trunk/pypy/jit/tool/log2gnumeric.py
   pypy/trunk/pypy/jit/tool/test/test_log2gnumeric.py
Log:
add a series showing the cpython vmrss (scaled to take the same time as the pypy one). While at it, rename every occurence of "memusage" to "vmrss"


Modified: pypy/trunk/pypy/jit/tool/log-template.gnumeric
==============================================================================
Binary files. No diff available.

Modified: pypy/trunk/pypy/jit/tool/log2gnumeric.py
==============================================================================
--- pypy/trunk/pypy/jit/tool/log2gnumeric.py	(original)
+++ pypy/trunk/pypy/jit/tool/log2gnumeric.py	Wed Nov 24 17:18:36 2010
@@ -29,7 +29,8 @@
     xml = replace_sheet(xml, 'translation-task', tasks_rows(time0, data))
     xml = replace_sheet(xml, 'gc-collect', gc_collect_rows(time0, data))
     xml = replace_sheet(xml, 'loops', loops_rows(time0, data))
-    xml = replace_sheet(xml, 'vmrss', memusage_rows(logname + '.vmrss', maxtime))
+    xml = replace_sheet(xml, 'vmrss', vmrss_rows(logname + '.vmrss', maxtime))
+    xml = replace_sheet(xml, 'cpython-vmrss', vmrss_rows('cpython.vmrss', maxtime))
     #
     out = gzip.open(outname, 'wb')
     out.write(xml)
@@ -141,16 +142,16 @@
         yield clock, loops+bridges, loops, bridges
 
 
-def memusage_rows(filename, maxtime):
+def vmrss_rows(filename, maxtime):
     try:
         lines = open(filename).readlines()
     except IOError:
-        print 'Warning: cannot find file %s, skipping the memusage sheet'
+        print 'Warning: cannot find file %s, skipping this sheet'
         lines = []
-    for row in memusage_rows_impl(lines, maxtime):
+    for row in vmrss_rows_impl(lines, maxtime):
         yield row
 
-def memusage_rows_impl(lines, maxtime):
+def vmrss_rows_impl(lines, maxtime):
     yield 'inferred clock', 'VmRSS'
     numlines = len(lines)
     for i, line in enumerate(lines):

Modified: pypy/trunk/pypy/jit/tool/test/test_log2gnumeric.py
==============================================================================
--- pypy/trunk/pypy/jit/tool/test/test_log2gnumeric.py	(original)
+++ pypy/trunk/pypy/jit/tool/test/test_log2gnumeric.py	Wed Nov 24 17:18:36 2010
@@ -65,9 +65,9 @@
     assert rows[2] == (0x8000-0x1000,    1, 'rtype_lltype')
 
 
-def test_memusage_rows():
+def test_vmrss_rows():
     lines = ['100', '200', '300']
-    rows = list(log2gnumeric.memusage_rows_impl(lines, 2000))
+    rows = list(log2gnumeric.vmrss_rows_impl(lines, 2000))
     assert len(rows) == 4
     assert rows[0] == ('inferred clock', 'VmRSS')
     assert rows[1] == (0, 100)



More information about the Pypy-commit mailing list