phacility / xhprof

XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.
http://pecl.php.net/package/xhprof
Apache License 2.0
2.6k stars 925 forks source link

Add ability to change sampling rate #76

Open rmccue opened 8 years ago

rmccue commented 8 years ago

Right now, the sampling rate from xhprof_sample_enable is hardcoded to once every 100ms. This isn't granular enough for much of the stuff I need it for, and definitely isn't granular enough to produce things like flamegraphs from.

It'd be nice to be able to set this via either an INI setting or via a parameter to xhprof_sample_enable to allow more detail in samples.