Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Python profiler

Reply
Thread Tools

Python profiler

 
 
Celine & Dave
Guest
Posts: n/a
 
      10-03-2005
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_GLOBAL 0 (dict)
3 LOAD_ATTR 1 (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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy Profiler - Compile-time profiler for C++ potatosoftware C++ 0 11-04-2009 04:46 PM
Interpreting python profiler results Will Ware Python 0 03-08-2006 01:47 AM
Python profiler Celine & Dave Python 2 10-04-2005 12:42 PM
Python Profiler Trouble Scott Brady Drummonds Python 1 02-25-2004 09:49 PM
Pssible Bug in Python Profiler Christoph Becker-Freyseng Python 0 08-13-2003 09:09 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57