Python profiler

2005-10-03 Thread Celine Dave
Hello All,
 
I am trying to measure memory used in a Python
program. Also, I would like to gather some statistics
about object usages. For example, I would like to be
able to see how much time it takes to search for an
item in a dict object, how many times it has to access
the symbol table to retrieve a specific item, and
things like that. Furthermore, I would like to be able
to see how a symbol table is created, how many items
it has, how many times it is accessed during
execution, etc.

Python profiler gives timing information about
functions/methods. For example, it doesn't show how
many times a dictionary object is accessed to retrieve
a key or how much time it takes.
 
The dis module doesn't provide detailed information
either. For the following code, 

dict = { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5}
print dict.has_key('e')

The dis module provides the following:

 0 LOAD_GLOBAL0 (dict)
 3 LOAD_ATTR1 (has_key)
 6 LOAD_CONST  1 ('e')
 9 CALL_FUNCTION 1
 12 PRINT_ITEM   

But this doesn't really help to see what's going on
with the symbol table.   

Any help is greatly appreaciated. Thanks a lot! 
   
Regards,

Dave



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Python Debug Build

2005-10-03 Thread Celine Dave
Hi,

What happens if I build Python with debug option
(--with-pydebug)? Do I see any changes in my program
output? What is --with-pydebug good for?

Thanks.



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
-- 
http://mail.python.org/mailman/listinfo/python-list


Python profiler

2005-09-30 Thread Celine Dave
Hello All,

I am trying to find a profiler that can measure the
memory usage in a Python program. I would like to
gather some statistics about object usages. For
example, I would like to be able to see how much time
it takes to search for an item in a dict object, how
many times it has to access the symbol table to
retrieve a specific item, and things like that.

Thanks,

Dave



__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
-- 
http://mail.python.org/mailman/listinfo/python-list