Page MenuHomePhabricator

Add xhprof PHP package
Closed, ResolvedPublic

Description

xhprof is a lightweight and configurable profiling module to profile CPU, memory, and execution time of PHP code in production and test servers. Each user can set it up the way they need it to and profiling is only done when the user instructs PHP to do so from within their code. So resources and disk space are not wasted when not needed.

For PHP5 it should be easy to install with apt-get install php5-xhprof

PHP7 takes a bit of doing. I can probably help with that.

Event Timeline

See also T176916. You might want to start with Tideways for the time being until XHProf for PHP 7 is ready. And make it very clear that code using Tideways should be conditional (just like for xhprof) and should check for both Tideways and XHProf.

Example from MediaWiki core:
https://github.com/wikimedia/mediawiki/blob/3488f495/includes/libs/Xhprof.php#L57-L79

Well there exists a fork of xhprof designed for PHP7.

It installed just fine on my exec hosts on my project.

bd808 added a subscriber: bd808.Oct 31 2017, 12:42 AM

PHP7 takes a bit of doing. I can probably help with that.

Currently we are only installing binary packages that are available in https://apt.wikimedia.org/wikimedia/ or upstream from Debian/Ubuntu's apt repos. The main reasons for this are repeatability of deployment and reliable security patching.

PHP7 takes a bit of doing. I can probably help with that.

Currently we are only installing binary packages that are available in https://apt.wikimedia.org/wikimedia/ or upstream from Debian/Ubuntu's apt repos. The main reasons for this are repeatability of deployment and reliable security patching.

Understandable. But since tools is using PHP5, that shouldn't be a problem?

Change 409226 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/puppet@production] toolforge: add user requested packages

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

bd808 claimed this task.Feb 9 2018, 7:04 AM

Change 409226 merged by Arturo Borrero Gonzalez:
[operations/puppet@production] toolforge: add user requested packages

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

bd808 closed this task as Resolved.Feb 11 2018, 10:44 PM