\ay\redirect(\ay\REDIRECT_REFERRER, 'Second request data not found.'); } else { if (array_map(function ($e) { return $e['callee_id']; }, $request['callstack']) !== array_map(function ($e) { return $e['callee_id']; }, $second_request['callstack'])) { \ay\redirect(\ay\REDIRECT_REFERRER, 'Cannot compare the two requests. The callstack does not match.'); } else { if ($request == $second_request) { \ay\redirect(\ay\REDIRECT_REFERRER, 'Cannot compare the request to itself.'); } } } $second_xhprof_obj = new Model($second_request); $second_aggregated_stack = $second_xhprof_obj->getAggregatedStack(); } require __DIR__ . '/form.inc.tpl.php'; require __DIR__ . '/pie.inc.tpl.php'; /** * @param string $name Metrics name. * @param string $group Inclusive|Exclusive. * @param array $a Present request metrics. * @param array $b Request to compare to. */ $fn_metrics_column = function ($name, $group, $a, $b = null) { $a = format_metrics($a['metrics'][$group][$name], $name); $weight = $a['raw']; $metrics = '<div class="metrics-parameter">' . $a['formatted'] . '</div>'; if ($b) { $b = format_metrics($b['metrics'][$group][$name], $name);