Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #16814: Add SAGE_PROFILE to enable profiler
The new `SAGE_PROFILE` environment variable controls whether to build with profiling support. It defaults to off since this potentially is a big performance impact. Right now it only controls Cython profiling, but third-party packages should support it in the future if they can. With `SAGE_PROFILE=no`: {{{ sage: %prun 1 + 1 2 function calls in 0.000 seconds Ordered by: internal time 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} }}} With `SAGE_PROFILE=yes`: {{{ sage: %prun 1 + 1 13 function calls in 0.000 seconds Ordered by: internal time 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 element.pyx:1538(__add__) 1 0.000 0.000 0.000 0.000 integer.pyx:1605(_add_) 3 0.000 0.000 0.000 0.000 integer.pyx:6276(fast_tp_new) 2 0.000 0.000 0.000 0.000 integer.pyx:512(__init__) 3 0.000 0.000 0.000 0.000 integer.pyx:6362(fast_tp_dealloc) 1 0.000 0.000 0.000 0.000 coerce.pxi:7(have_same_parent) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} }}} URL: http://trac.sagemath.org/16814 Reported by: vbraun Ticket author(s): Volker Braun Reviewer(s): Martin Raum
- Loading branch information