Sampling profilers for pyRevit scripts?

Hi there,
I’m trying to find out a way to profile a long running pyRevit script (a massive parameter writer/validator starting from an excel file run on a model with 37k elements) using a sampling profiler to reduce the overhead of the standard python profiler and remove the “noise” (quick functions/calls are not listed since they are not detected).
I know of pyinstrument, but it uses a c extension, so it’s not usable with ironpyhton, and py-spy, written in rust, but it is a standalone program that either needs (and runs) the python script by itself or the pid of the python executable running the script (obviously it doesn’t work if I use the main Revit process pid).

Do you have any experience with profiling inside pyRevit?