Sometimes I debug performance issues, and when I do, I often use flamegraphs. My typical workflow used to consist of me doing the following in a loop:
scpthe flamegraph from the remote VM back to my local machine
scp-ing the flamegraph back to my local machine again and again. There are many HTTP server one-liners out there, the one I use is
I start it in the directory where I put the output of the flamegraph tool, and usually inside a
$ python -m http.server 8080
tmuxsession to prevent it from dying when I log out for the day. Then I can point my browser at the HTTP server and open the HTML or SVG file directly, eliminating step 3 from my debugging process.
It's such a simple, and in retrospect obvious, change to my workflow, but it makes the iterative debugging process much more seamless. An additional benefit is that you can share interesting findings with any colleagues who have access to the network where the VM is located just by sending them a URL to a flamegraph.