Skip to content

Commit

Permalink
Inject extra help for the temporal flame graphs
Browse files Browse the repository at this point in the history
Temporal flame graphs have just been inheriting the help text of normal
flame graphs. Update this to add a small section explaining how to use
the sliders to investigate a different time range.

Signed-off-by: Matt Wozniski <[email protected]>
  • Loading branch information
godlygeek authored and pablogsal committed Feb 24, 2023
1 parent 3de0ac0 commit 8782f56
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/memray/reporters/templates/flamegraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
The flame graph displays a snapshot of memory used across stack frames at the time <b>when the memory usage was at its peak</b>.
</p>
{% endif %}
{% block slider_help %}
{% endblock %}
<p>
The vertical ordering of the stack frames corresponds to the order of function calls, from parent to children.
The horizontal ordering does not represent the passage of time in the application: they simply represent child frames in arbitrary order.
Expand Down
10 changes: 10 additions & 0 deletions src/memray/reporters/templates/temporal_flamegraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@
</div>
{% endblock %}

{% block slider_help %}
<p>
Initially the report shows allocations made at any time and not freed before
tracking was deactivated. By using the two sliders on the bottom line chart,
you can select a different time range for analysis instead. The flame graph
will be updated to reflect allocations made within your chosen time window
and not freed within it.
</p>
{% endblock %}

{% block flamegraph_script %}
<script type="text/javascript">
{%- include "assets/temporal_flamegraph.js" -%}
Expand Down

0 comments on commit 8782f56

Please sign in to comment.