Is there something about the actual profiler that differs from existing tools like pyinstrument [1] or py-spy [2]? I know pyinstrument has various output options and I wonder if it could potentially output something readable by the Firefox Profiler tool. [1] : https://github.com/joerick/pyinstrument [2] : https://github.com/benfred/py-spy
You can then post-process that trivially to get low resolution aggregate information like normal statistical/sampling profilers generate.