#5814: %prun doesn't work in the notebook
-------------------------------+--------------------------------------------
       Reporter:  rlm          |         Owner:  tkluck          
           Type:  enhancement  |        Status:  positive_review 
       Priority:  major        |     Milestone:  sage-5.9        
      Component:  notebook     |    Resolution:                  
       Keywords:               |   Work issues:                  
Report Upstream:  N/A          |     Reviewers:  Travis Scrimshaw
        Authors:  Timo Kluck   |     Merged in:                  
   Dependencies:               |      Stopgaps:                  
-------------------------------+--------------------------------------------

Comment (by tscrim):

 Replying to [comment:12 nbruin]:
 > It's probably outside the scope of this ticket, but the ''really''
 useful thing would be if `%prun ...` in the notebook would return an
 interactive browser for the `Stat` object that is returned by
 `cProfile().runctx(...)`. While a basic printout of profiling data gives
 some indication, one usually needs to dig around a little in the data to
 find what the real bottleneck is (see where most calls come from, switch
 between cumulative and proper time, etc.)

 +1/2 since being able to read/interpret the raw data is a good skill to
 have IMO. However a graphical (or at least a tree structure) of the data
 is also very useful.
 >
 > Writing such a browser might be a nice exercise for a student who is
 interested in interface programming. I bet there are good profiler
 browsers around to get inspiration from.

 +1 here. I feel like we need a wiki page to keep a list of "good student
 projects"...

 > A tool I haven't used yet but looks like a decent effort is
 [https://pypi.python.org/pypi/RunSnakeRun runsnakerun]. Duplicating that
 effort for the sage notebook might not seem like such a smart idea.
 Perhaps we can make the tool more easily accessible from sage? Given that
 it uses wxPython that might not be so very easily done ... I ended up
 installing it using OS tools, meaning that I ''have'' to write the profile
 data to a file and analyse it separately.

 I've seen runsnakerun used in a few places (although I haven't used it
 myself), and instead of duplicating it in the notebook, perhaps we could
 link it into sage (notebook) as some type of package? Actually...perhaps
 what we should do is have a variable/function which calls your favorite
 profiler on the executed command(s), something like:
 {{{
 %profile
 2 + 2
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5814#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to