profile_code.R review
This issue is mostly a discussion. To hear @dyb opinion on the function profile_code.R.
Basically the issue is that we must be careful when profiling the code, if we do it in big chunks for highly demanding task (e.g profile the entire new_merge_year_ids.R) we might find that in JASMIN for example, the resources will be more drain, the run will go slower and we can increase the time of runs forcing our jobs to stop or crash.
Therefore I created different functions to turn on the profiler and turn it back off. Saving the profiler data output to the same filename that you specify when you call the function. I also added a simple summary function, to read the output of the profiler and write it to a .csv
Cheers