Skip to content

Instantly share code, notes, and snippets.

@vincentqb
Created February 18, 2021 23:34
Show Gist options
  • Select an option

  • Save vincentqb/b14c4549b65afe063537e5c91e11376d to your computer and use it in GitHub Desktop.

Select an option

Save vincentqb/b14c4549b65afe063537e5c91e11376d to your computer and use it in GitHub Desktop.
Performance visualization with flame graphs
perf record -F 320 --call-graph dwarf python some_script.py
perf script > out.perf
# Visualize as flame graphs: https://github.com/brendangregg/FlameGraph
~/FlameGraph/stackcollapse-perf.pl out.perf > out.folded
~/FlameGraph/flamegraph.pl out.folded > out.svg
google-chrome out.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment