Page MenuHomePhabricator

In DarkConsole, Query profiling in "Analyze" mode helpfully includes stack traces to help identify where a query came from, but these aren't clearly labeled and look like error traces
Closed, InvalidPublic

Description

I don't have any idea when this appeared because I just decided I wanted to profile some stuff today, but this is super easy to reproduce:

Event Timeline

Oh also apparently query profiling doesn't always come up when you click on it, here is an example error

arcanist(head=master, ref.master=222800a86ed0), libcore(), phabricator(head=master, ref.master=cac3dc4983c3), phutil(head=master, ref.master=4206849bb05b), secure(head=master, ref.master=988cf9bd7958), services(head=master, ref.master=3d2895d3949f)
  #0 PhutilServiceProfiler::beginServiceCall(array) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:170]
  #1 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:8]
  #2 queryfx(AphrontMySQLiDatabaseConnection, string, string)
  #3 call_user_func_array(string, array) called at [<phutil>/src/xsprintf/queryfx.php:13]
  #4 queryfx_all(AphrontMySQLiDatabaseConnection, string, string) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:116]
  #5 PhabricatorCursorPagedPolicyAwareQuery::loadStandardPageRowsWithConnection(AphrontMySQLiDatabaseConnection, string) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:107]
  #6 PhabricatorCursorPagedPolicyAwareQuery::loadStandardPageRows(PhabricatorSpacesNamespace) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:99]
  #7 PhabricatorCursorPagedPolicyAwareQuery::loadStandardPage(PhabricatorSpacesNamespace) called at [<phabricator>/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php:40]
  #8 PhabricatorSpacesNamespaceQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:236]
  #9 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php:114]
  #10 PhabricatorSpacesNamespaceQuery::getAllSpaces() called at [<phabricator>/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php:92]
  #11 PhabricatorSpacesNamespaceQuery::getSpacesExist() called at [<phabricator>/src/applications/base/controller/PhabricatorController.php:212]
  #12 PhabricatorController::willBeginExecution() called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:245]
  #13 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:181]
  #14 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phabricator>/webroot/index.php:17]

When you "Analyze", we include a stack trace of where the query was issued from so you can hunt it down if you aren't sure. Does that explain the behavior?

epriestley renamed this task from Query profiling errors out pretty often in darkconsole to In DarkConsole, Query profiling in "Analyze" mode helpfully includes stack traces to help identify where a query came from, but these aren't clearly labeled and look like error traces.Jul 20 2018, 5:16 PM
epriestley triaged this task as Wishlist priority.
epriestley added a project: Infrastructure.

(Yell if I'm assuming too much here.)

Yeah it does, and I just didn't recall ever seeing this behavior and assumed "stack trace" meant "error".

We could probably clean this up (it does look a lot like an error) but DarkConsole isn't exactly a shining example of perfect visual design anyway and I'll probably remember or catch this when it next gets a cleanup pass, some time in 3050.