Discussion:
Run shoebot in python profier?
Stuart Axon
2009-04-07 21:24:32 UTC
Permalink
Has anybody got any experience of running python profilers? I'd quite like to run shoebot in one and see what seems to use the CPU
Dave Crossland
2009-04-07 21:45:55 UTC
Permalink
Nope, but please do post the results on list! :)
Pedro Ângelo
2009-04-08 23:53:44 UTC
Permalink
On Tue, 7 Apr 2009 14:24:32 -0700 (PDT)
Post by Stuart Axon
Has anybody got any experience of running python profilers? I'd
quite like to run shoebot in one and see what seems to use the CPU
I never bothered trying it until I saw your mail :) I followed this
guide:

http://docs.python.org/library/profile.html#instant-user-s-manual

and this worked for me:

python -m cProfile /usr/bin/sbot path/to/testfile.bot

If you want to save the profile data to a file to massage it later with
the stats module, you can do:

python -m cProfile -o profile_data /usr/bin/sbot path/to/testfile.bot

Although the profile modules are suposed to be in the standard Python
install, I had to install the python-profile module on Ubuntu for them
to work properly.

Have fun,

P.

Loading...