CPU starts CPU profiling and saves the statistics into a file specified by profilePath. It overwrites the file
if it already exists. To finalize profiling caller needs to call finish function returned.
Heap starts heap profiling and saves the statistics into a file specified by profilePath. It overwrites the file
if it already exists. To finalize profiling caller needs to call finish function returned.