When the evaluation of f x is complete, the profiler returns both the result of f x, and the execution profile that was constructed for it.
These results are expressed in a pair of type 'a result * profile. The profile is the most interesting here, as it is a record containing several values. One of the values is of type function_profile, which is the type of function execution profiles. The other values (of types call_header, general_header, space_header, time_header) record information about profiler performance and are not generally of interest.
The execution profile for the function itself is returned in the value of type function_profile in the profile value's functions field. The function_profile value contains four fields:
idA string containing the profiled function's name, its location, and, possibly, compilation information.
call_countThe total number of times the profiled function was called.
time A value of type function_time_profile containing time-profiling results. This field will have no useful value unless you request time profiling in the profiling manner.
space A value of type function_space_profile containing space-profiling results. This field will have no useful value unless you request space profiling in the profiling manner.