docker pull markus621/php-prof
docker run --rm --name phpprof -it -v /local/dir:/var/www -p 9000-9003:9000-9003 markus621/php-prof
test: http://localhost:9002/demo.php
<?php
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
function demo_test()
{
for ($i = 0; $i <= 100; $i++) {
random_bytes(20);
}
}
demo_test();
$xhprof_data = xhprof_disable();
$XHPROF_ROOT = '/tools/xhprof/';
include_once $XHPROF_ROOT . '/xhprof_lib/utils/xhprof_lib.php';
include_once $XHPROF_ROOT . '/xhprof_lib/utils/xhprof_runs.php';
$xhprof_runs = new \XHProfRuns_Default();
$run_id = $xhprof_runs->save_run($xhprof_data, 'xhprof_testing');
echo "http://localhost:9002/index.php?run={$run_id}&source=xhprof_testing";
?>
Content type
Image
Digest
Size
182.7 MB
Last updated
over 6 years ago
docker pull markus621/php-prof:1.0.0