1.2.1614. ext/xhprof

Extension xhprof.

XHProf is a light-weight hierarchical and instrumentation based profiler.

<?php
xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);

for ($i = 0; $i <= 1000; $i++) {
    $a = $i * $i;
}

$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/xhprof/xhprof_html/index.php?run={$run_id}&source=xhprof_testing'.PHP_EOL;

?>

See also XHprof Documentation and ext/apcu.

1.2.1614.1. Specs

Short name

Extensions/Extxhprof

Rulesets

All, Appinfo, CE

Exakat since

0.8.4

PHP Version

All

Severity

Time To Fix

Precision

Very high

Features

profiler

Available in

Entreprise Edition, Community Edition, Exakat Cloud