@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

In "Analyze Query Plans" mode, collect service call stack traces in DarkConsole

Summary: Ref T13106. When profiling service queries, there's no convenient way to easily get a sense of why a query was issued. Add a mode to collect traces for each query to make this more clear. This is rough, but works well enough to be useful.

Test Plan: Clicked "Analyze Query Plans", got stack traces for each service call.

Maniphest Tasks: T13106

Differential Revision: https://secure.phabricator.com/D19221

+30 -7
+2 -2
resources/celerity/map.php
··· 23 23 'rsrc/audio/basic/tap.mp3' => 'fc2fd796', 24 24 'rsrc/audio/basic/ting.mp3' => '17660001', 25 25 'rsrc/css/aphront/aphront-bars.css' => '231ac33c', 26 - 'rsrc/css/aphront/dark-console.css' => 'f7b071f1', 26 + 'rsrc/css/aphront/dark-console.css' => '0e14e8f6', 27 27 'rsrc/css/aphront/dialog-view.css' => '6bfc244b', 28 28 'rsrc/css/aphront/list-filter-view.css' => '5d6f0526', 29 29 'rsrc/css/aphront/multi-column.css' => '84cc6640', ··· 518 518 'symbols' => array( 519 519 'almanac-css' => 'dbb9b3af', 520 520 'aphront-bars' => '231ac33c', 521 - 'aphront-dark-console-css' => 'f7b071f1', 521 + 'aphront-dark-console-css' => '0e14e8f6', 522 522 'aphront-dialog-view-css' => '6bfc244b', 523 523 'aphront-list-filter-view-css' => '5d6f0526', 524 524 'aphront-multi-column-view-css' => '84cc6640',
+23 -1
src/applications/console/plugin/DarkConsoleServicesPlugin.php
··· 29 29 return false; 30 30 } 31 31 32 + public function didStartup() { 33 + $should_analyze = self::isQueryAnalyzerRequested(); 34 + 35 + if ($should_analyze) { 36 + PhutilServiceProfiler::getInstance() 37 + ->setCollectStackTraces(true); 38 + } 39 + 40 + return null; 41 + } 42 + 43 + 32 44 /** 33 45 * @phutil-external-symbol class PhabricatorStartup 34 46 */ ··· 266 278 $info, 267 279 $analysis, 268 280 ); 281 + 282 + if ($row['trace']) { 283 + $rows[] = array( 284 + null, 285 + null, 286 + null, 287 + $row['trace'], 288 + null, 289 + ); 290 + } 269 291 } 270 292 271 293 $table = new AphrontTableView($rows); ··· 274 296 null, 275 297 'n', 276 298 'n', 277 - 'wide', 299 + 'wide prewrap', 278 300 '', 279 301 )); 280 302 $table->setHeaders(
+5 -4
webroot/rsrc/css/aphront/dark-console.css
··· 104 104 font-size: 11px; 105 105 background: #333333; 106 106 color: #ffffff; 107 + border-bottom: 0px; 107 108 } 108 109 109 110 .dark-console .aphront-table-view td { ··· 210 211 } 211 212 212 213 .dark-console-panel-request-log-separator { 213 - background-color: #e8e8e8; 214 - border-bottom: 1px solid #b7b7b7; 215 - border-top: 1px solid #b7b7b7; 216 - height: 2px; 214 + background-color: #e8e8e8; 215 + border-bottom: 1px solid #b7b7b7; 216 + border-top: 1px solid #b7b7b7; 217 + height: 2px; 217 218 } 218 219 219 220 .dark-console-panel-ErrorLog {