| Extracted from Pike v7.8 release 866 at 2018-02-09.

[Top]

# Method get_profiling_info()

Method get_profiling_info

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

Description

  Get profiling information.

Returns

  Returns an array with two elements.

  Array
  `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.

  Array
  `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.

Note

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