Ah! Running cp.run('Problem3A()') did the job. Nevermind!
On Feb 1, 9:07 pm, Stefan <[email protected]> wrote:
> Hi guys,
>
> After searching through the newsgroup for any posts on profiling code
> in Sage, I thought I'd make a post asking about what possible methods
> are available.
>
> (I did come across a post that utilized 'prun', but I couldn't figure
> out how to get it to work.)
>
> Anyway, after running the code:
>
> import cProfile as cp
> cp.run('Problem3A')
>
> Where Problem3A is a function that was previously defined, the result
> is:
>
> 2 function calls in 0.000 CPU seconds
>
> Ordered by: standard name
>
> ncalls tottime percall cumtime percall filename:lineno
> (function)
> 1 0.000 0.000 0.000 0.000
> <string>:1(<module>)
> 1 0.000 0.000 0.000 0.000 {method 'disable' of
> '_lsprof.Profiler' objects}
>
> (This was done on the Sagenb.org site)
>
> Can anyone point me in the right direction for profiling a Python
> function in Sage?
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org