1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-22 13:30:55 +01:00

Fix various darkconsole warnings.

This commit is contained in:
epriestley 2011-07-12 09:41:34 -07:00
parent f761ee91d3
commit 87436ff8a3

View file

@ -32,7 +32,7 @@ class DarkConsoleServicesPlugin extends DarkConsolePlugin {
$log = PhutilServiceProfiler::getInstance()->getServiceCallLog(); $log = PhutilServiceProfiler::getInstance()->getServiceCallLog();
foreach ($log as $key => $entry) { foreach ($log as $key => $entry) {
$config = $entry['config']; $config = idx($entry, 'config', array());
unset($log[$key]['config']); unset($log[$key]['config']);
if (empty($_REQUEST['__analyze__'])) { if (empty($_REQUEST['__analyze__'])) {
@ -168,13 +168,12 @@ class DarkConsoleServicesPlugin extends DarkConsolePlugin {
$counts = array(); $counts = array();
foreach ($log as $row) { foreach ($log as $row) {
$totals[$row['type']] += $row['duration']; $totals[$row['type']] = idx($totals, $row['type'], 0) + $row['duration'];
$counts[$row['type']]++; $counts[$row['type']] = idx($counts, $row['type'], 0) + 1;
} }
$totals['All'] = array_sum($totals); $totals['All'] = array_sum($totals);
$counts['All'] = array_sum($counts); $counts['All'] = array_sum($counts);
$table = new AphrontTableView();
$summary = array(); $summary = array();
foreach ($totals as $type => $total) { foreach ($totals as $type => $total) {
$summary[] = array( $summary[] = array(