It would be really powerful to have the ability to programmatically start and stop the profiler from inside `spark-api`. This allows for automatic reporting of server issues preemptively (using averages from TPS and MSPT) If needed I can submit a PR for this.