Answer the question
In order to leave comments, you need to log in
Why does xhprof give "Invalid Run Id"?
Good day!
There is a site on BitrixVM (CentOS 7), php7.1 and xhprof port for version 7 installed from https://github.com/rustjson/xhprof
I assembled it
manually according to the instructions. Apache picks up the extension, it is also shown in phpinfo.
I run a test file from the browser with the following code:
# Инициализируем профайлер
if (extension_loaded('xhprof')) {
include_once '/home/bitrix/www/xhprof/xhprof_lib/utils/xhprof_lib.php';
include_once '/home/bitrix/www/xhprof/xhprof_lib/utils/xhprof_runs.php';
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);
}
echo "1";
sleep(10);
echo "2";
if (extension_loaded('xhprof')) {
$profilerNamespace = '111';
$xhprofData = xhprof_disable();
$xhprofRuns = new XHProfRuns_Default();
$runId = $xhprofRuns->save_run($xhprofData, $profilerNamespace);
}
a:4:{s:14:"main()==>sleep";a:2:{s:2:"ct";i:1;s:2:"wt";i:9998437;}s:25:"main()==>extension_loaded";a:2:{s:2:"ct";i:1;s:2:"wt";i:11;}s:23:"main()==>xhprof_disable";a:2:{s:2:"ct";i:1;s:2:"wt";i:2;}s:6:"main()";a:2:{s:2:"ct";i:1;s:2:"wt";i:9998498;}}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question