Skip to content

Commit

Permalink
Merge pull request #6 from PavelSavushkinMix/feature/configurable_out…
Browse files Browse the repository at this point in the history
…put_dir

feat(xhprof): availability to change output_dir from configuration
  • Loading branch information
rez1dent3 committed Jun 2, 2020
2 parents 5e4bea8 + a414449 commit 75ff655
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
'enabled' => true,
'global_middleware' => true,
'path' => '/opt/xhprof',
'output_dir' => null,
'name' => 'xhprof',
'freq' => 1 / 1000,
'extension_name' => 'xhprof',
Expand Down
2 changes: 1 addition & 1 deletion src/Provides/TidewaysProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function enable()
public function disable()
{
$data = tideways_xhprof_disable();
$runs = new XHProfRuns_Default();
$runs = new XHProfRuns_Default(config('xhprof.output_dir', null));
$runs->save_run($data, config('xhprof.name'));
}

Expand Down
2 changes: 1 addition & 1 deletion src/Provides/XHProfProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function enable()
public function disable()
{
$data = xhprof_disable();
$runs = new XHProfRuns_Default();
$runs = new XHProfRuns_Default(config('xhprof.output_dir', null));
$runs->save_run($data, config('xhprof.name'));
}

Expand Down

0 comments on commit 75ff655

Please sign in to comment.