% Time | Time (ms) | Hits | {% for lineno, line, timing, nhits in function_result.timings %} {% set perc = 100 * timing/function_result.total_time %} {% if perc > 10 %} {% set tr_class = 'red10' %} {% elif perc > 1 %} {% set tr_class = 'red1' %} {% elif lineno % 2 == 0 %} {% set tr_class = 'even' %} {% else %} {% set tr_class = 'odd' %} {% endif %}|||||
---|---|---|---|---|---|---|---|
{{ lineno }} | {{ line }} |
{% if nhits != -1 %}
{{ "%.1f"|format(perc) }} | {{ "%.1f"|format(timing) }} | {{ nhits }} | {% else %}{% endif %} |
from flask_debugtoolbar_lineprofilerpanel.profile import line_profile # Using it as a decorator @app.route('/profile') @line_profile def profile_page(): ... return flask.render_template('profile_page') # Explicit argument line_profile(some_function)