xhprof (or tideways) visualize html tool from xhprof repo.
- clone repo
$ php -S localhost:8000
- Access http://localhost:8000/?dir={Your xhprof profiling result dir}
If you want graphing functions for xhprof run:
sudo apt install graphviz
- Install tideways extension
- Write code and save profiler result.
<?php
tideways_xhprof_enable();
my_application();
$data = tideways_xhprof_disable();
$filename = '/tmp/' . intval(microtime(true)) . mt_rand(1,10000) . '.xhprof';
file_put_contents($filename, serialize($data));
echo 'Profile Result: ' . $filename;
- Start this web app at PHP build-in server.
$ php -S localhost:8000
-
Enjoy profiling!