Changeset View
Changeset View
Standalone View
Standalone View
src/aphront/console/plugin/DarkConsoleServicesPlugin.php
| <?php | <?php | ||||
| /** | |||||
| * @group console | |||||
| */ | |||||
| final class DarkConsoleServicesPlugin extends DarkConsolePlugin { | final class DarkConsoleServicesPlugin extends DarkConsolePlugin { | ||||
| protected $observations; | protected $observations; | ||||
| public function getName() { | public function getName() { | ||||
| return 'Services'; | return 'Services'; | ||||
| } | } | ||||
| Show All 17 Lines | public static function isQueryAnalyzerRequested() { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /** | /** | ||||
| * @phutil-external-symbol class PhabricatorStartup | * @phutil-external-symbol class PhabricatorStartup | ||||
| */ | */ | ||||
| public function generateData() { | public function generateData() { | ||||
| $should_analyze = self::isQueryAnalyzerRequested(); | $should_analyze = self::isQueryAnalyzerRequested(); | ||||
| $log = PhutilServiceProfiler::getInstance()->getServiceCallLog(); | $log = PhutilServiceProfiler::getInstance()->getServiceCallLog(); | ||||
| foreach ($log as $key => $entry) { | foreach ($log as $key => $entry) { | ||||
| $config = idx($entry, 'config', array()); | $config = idx($entry, 'config', array()); | ||||
| unset($log[$key]['config']); | unset($log[$key]['config']); | ||||
| if (!$should_analyze) { | if (!$should_analyze) { | ||||
| ▲ Show 20 Lines • Show All 248 Lines • Show Last 20 Lines | |||||