On Wed, Jul 13, 2011 at 7:16 PM, john_perry_usm <[email protected]> wrote:
> Hi
>
> In a previous thread, Martin Rubey had problems running the profiler
> in Cython. See
>
> http://groups.google.com/group/sage-devel/browse_thread/thread/81d1cc666e1ffbe6/
>
> His question seemed to have gone unresolved.
>
> I'm having the same problem. If I follow the tutorial at
>
> http://docs.cython.org/src/tutorial/profiling_tutorial.html?highlight=profile
>
> I don't get any of the profiling results that they show; instead, I
> get something similar to what Martin Rubey had:
>
> Wed Jul 13 21:11:02 2011    Profile.prof
>
>         3 function calls in 1.040 CPU seconds
>
>   Ordered by: internal time
>
>   ncalls  tottime  percall  cumtime  percall
> filename:lineno(function)
>        1    1.040    1.040    1.040    1.040
> {_atlas_perry_common_Research_SAGE_programs_gb_detection_calc_pi_pyx_1.approx_pi}
>        1    0.000    0.000    1.040    1.040 <string>:1(<module>)
>        1    0.000    0.000    0.000    0.000 {method 'disable' of
> '_lsprof.Profiler' objects}
>
>
> <pstats.Stats instance at 0xd774e4c>
>
> Does anyone know what is causing this? I'm emailing Martin as well, to
> learn if he ever resolved it himself.


Use a .pyx file instead of a .spyx file, or decorate the interesting
functions with @cython.profile(True) (after importing cython).

- Robert

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to