[pypy-svn] r59005 - pypy/dist/pypy/module/marshal

xoraxax at codespeak.net xoraxax at codespeak.net
Sat Oct 11 19:18:45 CEST 2008


Author: xoraxax
Date: Sat Oct 11 19:18:44 2008
New Revision: 59005

Modified:
   pypy/dist/pypy/module/marshal/interp_marshal.py
Log:
Add a timer for marshal loads.

Modified: pypy/dist/pypy/module/marshal/interp_marshal.py
==============================================================================
--- pypy/dist/pypy/module/marshal/interp_marshal.py	(original)
+++ pypy/dist/pypy/module/marshal/interp_marshal.py	Sat Oct 11 19:18:44 2008
@@ -54,8 +54,11 @@
 def loads(space, w_str):
     """Convert a string back to a value.  Extra characters in the string are
 ignored."""
+    space.timer.start("marshal loads")
     u = StringUnmarshaller(space, w_str)
-    return u.get_w_obj(False)
+    obj = u.get_w_obj(False)
+    space.timer.stop("marshal loads")
+    return obj
 
 
 class AbstractReaderWriter(object):



More information about the Pypy-commit mailing list