You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1- add the following variable: PHP_XHPROF: 1
2- add the following volume: - ./files:/mnt/files
In the code where you 'd like to profile, do:
// Start profiling.
if (extension_loaded('xhprof')) {
xhprof_enable(XHPROF_FLAGS_MEMORY | XHPROF_FLAGS_CPU);
}
// ..... code to profile ..........
// Store profile.
if (extension_loaded('xhprof')) {
$data = xhprof_disable();
$xhprof_out = '/mnt/files/private/xhprof';
if (!file_exists($xhprof_out)) {
mkdir($xhprof_out);
}
file_put_contents(sprintf('%s/%s.%s.xhprof', $xhprof_out, uniqid(), 'web'), serialize($data));
}
After running the code, traces will be generated at /files/private/xhprof and they can be viewed at: http://PROJECT_NAME.xhprofv.localhost/index.php?run=
For some reason, the "xhprof" container is not rendering the callgraph using correct unicodes:
This is why we have the container xhprof_viewer,
The text was updated successfully, but these errors were encountered:
Currently it's hard to do profiling. I want to summarize it here and then look for a simple solution:
Add the following containers:
In the PHP container:
1- add the following variable:
PHP_XHPROF: 1
2- add the following volume:
- ./files:/mnt/files
In the code where you 'd like to profile, do:
After running the code, traces will be generated at
/files/private/xhprof
and they can be viewed at:http://PROJECT_NAME.xhprofv.localhost/index.php?run=
For some reason, the "xhprof" container is not rendering the callgraph using correct unicodes:
This is why we have the container
xhprof_viewer
,The text was updated successfully, but these errors were encountered: