Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 16th, 2006, 03:15 PM
Brian Cole
Guest
 
Posts: n/a
Default Extracting results from a large hotshot profile

I'm profiling some code that screens a large database. The algorithm
efficiency is heavily variable, based upon the different records in
the database. In order to get a sense of the best place to start
optimizing the code I did a hotshot profile. To make this profile took
about a day. However, I've been trying to extract results from the
profile for the past two days. It's eating up all the memory (2G
memory) on the machine and is slowing sucking up the swap space
(another 2G).

I'm hesitant to kill it for I might get results out of it some day
(even if I may have to bequeath them to my grand-children), but is
there a better way to do this?

I'm using the following script to print my results:
import sys
import hotshot.stats
stats = hotshot.stats.load(sys.argv[1])
stats.strip_dirs()
stats.sort_stats('time', 'calls')
stats.print_stats(20)

The profile is 355 MB large. Is there anything I can do to extract that data?

Thanks in advance,
Brian Cole
 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles