Skip to content

Commit

Permalink
made sampling_interval and sampling_depth changeable
Browse files Browse the repository at this point in the history
  • Loading branch information
shagtv committed Mar 5, 2019
1 parent 4251a00 commit 02d2c55
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Badoo/LiveProfiler/LiveProfiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,13 @@ public function useXhprofSample()
return false;
}

ini_set('xhprof.sampling_interval',100000);
ini_set('xhprof.sampling_depth',200);
if (!ini_get('xhprof.sampling_interval')) {
ini_set('xhprof.sampling_interval', 10000);
}

if (!ini_get('xhprof.sampling_depth')) {
ini_set('xhprof.sampling_depth', 200);
}

$this->start_callback = function () {
define('XHPROF_SAMPLING_BEGIN', microtime(true));
Expand Down

0 comments on commit 02d2c55

Please sign in to comment.