[Python-il] Is there a high-level profiling module for Python?

cool-RR cool-rr at cool-rr.com
Fri Dec 24 00:23:18 IST 2010


Hello all,

As I promised, here is the module for high-level profiling that I wrote,
called `cute_profile`:

https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/cute_profile/cute_profile.py

It's also tested<https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/test_garlicsim/test_general_misc/test_cute_profile/test_cute_profile.py>
.

You can use it by installing `garlicsim` and doing `from
garlicsim.general_misc import cute_profile`.

There is even a Python 3 version on the Python 3 fork of
GarlicSim<http://pypi.python.org/pypi/garlicsim_py3>.
So you can use it on Python 3 code.

Enjoy,
Ram.

On Fri, Sep 24, 2010 at 2:19 PM, cool-RR <cool-rr at cool-rr.com> wrote:

> Thanks for the tip Refael. Anyway I created the module that does what I
> wanted, it ended up being only ~30 lines. It will be released, documented
> and tested, with GarlicSim 0.6 in a few months from now.
>
>
> On Fri, Sep 24, 2010 at 10:54 AM, Refael Ackermann <refack at gmail.com>wrote:
>
>> A good place to start might be RunSnakeRun<http://www.vrplumber.com/programming/runsnakerun/>,
>> which aims to be a front end to the lower level profilers.
>> I don't think it does exactly what you want, but I believe extending it
>> might be better than starting from scratch.
>>
>> On Wed, Sep 22, 2010 at 23:57, cool-RR <cool-rr at cool-rr.com> wrote:
>>
>>> Hello folks,
>>>
>>> This question is going to be in the same spirit of my last question,
>>> except for a different topic. (The spirit is: "Here's something that I want,
>>> please tell me if something like this exists before I write it myself.")
>>>
>>> I'm looking for a high-level profiling module for Python.
>>>
>>> I want to profile my Python code. I am well-aware of `cProfile`, and I
>>> use it, but it's too low-level. (For example, there isn't even a
>>> straightforward way to catch the return value from the function you're
>>> profiling.)
>>>
>>> One of the things I would like to do: I want to take a function in my
>>> program and set it to be profiled *on the fly* while running the
>>> program.
>>>
>>> For example, let's say I have a function `heavy_func` in my program. I
>>> want to start the program and have the `heavy_func` function not profile
>>> itself. But sometime during the runtime of my program, I want to change
>>> `heavy_func` to profile itself while it's running. (If you're wondering how
>>> I can manipulate stuff while the program is running: I can do it either from
>>> the debug probe or from the shell that's integrated into my GUI app.)
>>>
>>> Is there a module already written which does stuff like this?
>>>
>>>
>>> Ram.
>>>
>>> _______________________________________________
>>> Python-il mailing list
>>> Python-il at hamakor.org.il
>>> http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
>>>
>>>
>>
>
>
> --
> Sincerely,
> Ram Rachum
>



-- 
Sincerely,
Ram Rachum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://hamakor.org.il/pipermail/python-il/attachments/20101224/33631486/attachment.htm>


More information about the Python-il mailing list