phacility/xhprof — pull request #39 by beberlei (2014-06-19 12:47:08+00:00)
Title: Whitelist for functions

Add feature to xhprof_enable() allowing to pass whitelist of "functions" into the $options array, profiling only those functions:

xhprof_enable(0, array('functions' => array('strlen'));
$data = xhprof_disable();

Will now only contain `main()` and `main()==>strlen`.

Since xhprof puts a relation with a parent, the only parent to `strlen` in this case is `main()`. However if you have a list of many functions, there might be a function called between `main()` and `strlen` and it will be displayed as such.