MediaWiki PHP profiling - Now also on Beta Cluster

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

MediaWiki PHP profiling - Now also on Beta Cluster

Krinkle
Hi all,

Wikimedia's production configuration of MediaWiki supports enabling request
profiling, to obtain call-graphs, flame graphs, and other useful details
about the PHP execution.

In production, this can be enabled by using the WikimediaDebug browser
extension. For instructions see
https://wikitech.wikimedia.org/wiki/X-Wikimedia-Debug.

Until now, none of these profiling modes were available on the Beta Cluster.

As of today, the "Plaintext request profile" is supported on Beta Cluster.
This profile can be obtained by adding ?forceprofile=1 to any web request,
and making sure the X-Wikimedia-Debug header is set.

To make this easier to enable from a web browser, the WikimediaDebug
browser extension was updated (WikimediaDebug v1.9.1) to also send
X-Wikimedia-Debug headers on Beta Cluster requests. (For the time being,
the backend host names are ignored for Beta Cluster requests, this is a
future to-do.)

Example from cURL:

$ curl -H 'X-Wikimedia-Debug: 1' '
https://en.wikipedia.beta.wmflabs.org/w/load.php?debug=false&modules=startup&only=scripts&forceprofile=1
'

Fr those with shell access, it can also be used on maintenance scripts (in
production, or in the Beta Cluster) by setting PHP=hhvm before the mwscript
command and adding the --profiler=text option.

-- Timo

[0] https://phabricator.wikimedia.org/T180766
_______________________________________________
Wikitech-l mailing list
[hidden email]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l