First solution for writing profiler data to a file
Reset profiler for each batch and distinguish between initial and following batches
Example call to check whether Metric profiles are written correctly