Skip to content

Commit 75ff655

Browse files
authored
Merge pull request #6 from PavelSavushkinMix/feature/configurable_output_dir
feat(xhprof): availability to change output_dir from configuration
2 parents 5e4bea8 + a414449 commit 75ff655

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

config/config.php

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
'enabled' => true,
55
'global_middleware' => true,
66
'path' => '/opt/xhprof',
7+
'output_dir' => null,
78
'name' => 'xhprof',
89
'freq' => 1 / 1000,
910
'extension_name' => 'xhprof',

src/Provides/TidewaysProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function enable()
2424
public function disable()
2525
{
2626
$data = tideways_xhprof_disable();
27-
$runs = new XHProfRuns_Default();
27+
$runs = new XHProfRuns_Default(config('xhprof.output_dir', null));
2828
$runs->save_run($data, config('xhprof.name'));
2929
}
3030

src/Provides/XHProfProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function enable()
2626
public function disable()
2727
{
2828
$data = xhprof_disable();
29-
$runs = new XHProfRuns_Default();
29+
$runs = new XHProfRuns_Default(config('xhprof.output_dir', null));
3030
$runs->save_run($data, config('xhprof.name'));
3131
}
3232

0 commit comments

Comments
 (0)