Page MenuHomePhabricator

CirrusSearch should embed performance data in the page output
Closed, ResolvedPublic

Description

To facilitate client-side reporting of RUM, CirrusSearch should embed relevant performance data in the page output.

This could be done by defining a MakeGlobalVariablesScript hook handler, or by adding a call to $out->addJsConfigVars() in CirrusSearch\Hooks::specialSearchResultsPrependHook.

(Please don't use <!-- comments -->; having to parse the data from a comment node sucks.)

As to what data should be sent: Navigation Timing data will tell us the total time it took the user's browser to retrieve and render the search result page, so what we want are figures that can tell us the portion of that time that was taken up by Cirrus. If you want to be very granular, and provide timing data for different parts of the total request processing time, that's fine too.

Please use milliseconds as the unit; fractional milliseconds are OK if you want finer resolution.


Version: unspecified
Severity: enhancement

Details

Reference
bz62768

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 2:58 AM
bzimport set Reference to bz62768.
bzimport added a subscriber: Unknown Object (MLST).

Change 119235 had a related patch set uploaded by Chad:
Rewrite SearchResultSet::getInfo() to actually be useful

https://gerrit.wikimedia.org/r/119235

Change 119237 had a related patch set uploaded by Chad:
Remove current implementation of getInfo()

https://gerrit.wikimedia.org/r/119237

Change 119238 had a related patch set uploaded by Chad:
Remove current implementation of getInfo()

https://gerrit.wikimedia.org/r/119238

Change 119238 merged by Chad:
Remove current implementation of getInfo()

https://gerrit.wikimedia.org/r/119238

Change 119236 merged by jenkins-bot:
Remove current implementation of getInfo()

https://gerrit.wikimedia.org/r/119236

Change 119237 merged by Chad:
Remove current implementation of getInfo()

https://gerrit.wikimedia.org/r/119237

Change 119503 had a related patch set uploaded by Chad:
Expose search metrics to Javascript for performance tooling

https://gerrit.wikimedia.org/r/119503

Change 119505 had a related patch set uploaded by Chad:
Remove completely useless implementation of getInfo()

https://gerrit.wikimedia.org/r/119505

Change 119235 abandoned by Chad:
Rewrite SearchResultSet::getInfo() to actually be useful

https://gerrit.wikimedia.org/r/119235

Change 119503 merged by jenkins-bot:
Expose search metrics to Javascript for performance tooling

https://gerrit.wikimedia.org/r/119503

Change 119505 merged by jenkins-bot:
Remove completely useless implementation of getInfo()

https://gerrit.wikimedia.org/r/119505

We now embed start time & end time (unix timestamp in ms) as well as the time spent in Elasticsearch (in ms). Closing as fixed as I think this is enough for now. If we need further metrics just file a new bug or reopen this one.