M2 Profiler

Here’s a FlameGraph visualization for the output of a M2 profiler that I’ve implemented:

Click on each box to interact and inspect the details

Guide

  1. Build Macaulay2 using CMake.
  2. Enable profiling, by running cmake -DPROFILING=ON . in the build directory.
  3. Run the test or script you would like to profile.
  4. Locate the raw profiling data file named profile-$PID.raw.
  5. Run ninja profile; when asked, enter the name of the profiling data file.
  6. A FlameGraph should automatically open. If not, open profile-$PID.raw.html in a browser.

Ideas