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:
parent
f761ee91d3
commit
87436ff8a3
1 changed files with 3 additions and 4 deletions
|
@ -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(
|
||||||
|
|
Loading…
Reference in a new issue