Method get_profiling_info()

Method get_profiling_info

array(int|mapping(string:array(int))) get_profiling_info(program prog)


Get profiling information.


Returns an array with two elements.

int num_clones

The first element is the number of times the program prog has been instantiated.

mapping(string:array(int)) fun_prof_info

The second element is mapping from function name to an array with three elements.

int num_calls

The first element is the number of times the function has been called.

int total_time

The second element is the total time (in milliseconds) spent executing this function, and any functions called from it.

int self_time

The third element is the time (in milliseconds) actually spent in this function so far.


This function is only available if the runtime was compiled with the option --with-profiling.