Questions tagged [xhprof]

XHProf is a profiling extension for PHP light weight enough to be run in production

XHProf is a profiling extension for PHP developed by Facebook to return sufficient profile details to diagnose problems, while still being sufficiently light weight to be run in production.

The extension itself returns nested arrays containing performance information, and is capable of storing them in a file on disk. Using a GUI can make using and interpreting the data much easier.


Documentation :

61 questions
12
votes
3 answers

how install xhprof for php 5.6 on windows

How to install the extension Xhprof on Windows for php-5.6? I found only this link: http://windows.php.net/downloads/pecl/releases/xhprof/0.10.6/
R.Gleb
  • 131
  • 1
  • 6
11
votes
1 answer

Profiling Code on Production

I'm toying around with the idea of implementing something that profiles code on the production server and wanted some best-practice advice. Obviously it's a bad idea to profile ALL requests because of the added overhead so I was looking into some…
Mike B
  • 31,886
  • 13
  • 87
  • 111
10
votes
3 answers

How can I use XHProf to profile PHPUnit tests from the command line?

I have some very slow PHPUnit tests (8 mins for 43 tests) and I need to use XHProf to find out what is going wrong. How can I do this from the command line? I have PHPUnit in the project's /vendor directory, loaded via composer.
Matt Gibson
  • 14,616
  • 7
  • 47
  • 79
6
votes
1 answer

Xdebug vs xhprof

I was using xdebug to profile the use of multi curl in my php code, and the numbers didn't add up to the total, so I used xhprof instead, which seemed to provide better data. Why is xdebug providing seemingly bad profiling info, and is there a way…
Kint
  • 133
  • 2
  • 7
6
votes
1 answer

determine how much resource used by a php script (cpu percentage and memory)

I'm currently using xhprof library forked by tideways.io for profiling myscript.php execution. From xhprof, i can get the walltime, cputime, memoryusage, and peakmemoryusage. I'm try to benchmark a symfony console - so i add TIDEWAYS_ENABLE() on its…
4
votes
1 answer

No XHProf runs specified in the URL

I have configured XHProf on linux server but on accessing xhprof_html/index.php, instead of displaying logged slow queries, it just displays this "No XHProf runs specified in the URL." What does this refer to?
Sidra Sultana
  • 529
  • 1
  • 5
  • 20
4
votes
1 answer

Profiling Regex Lexer

I've created a router in PHP which takes a DSL (based on the Rails 3 route) and converts it to Regex. It has optional segments (denoted by (nested) parenthesis). The following is the current lexing algorithm: private function…
efritz
  • 5,125
  • 4
  • 24
  • 33
4
votes
1 answer

Xhprof / xhgui : xhgui - document to insert contains invalid key: keys cannot contain "."

I'm trying to setup Xhgui with Xhprof. I followed the github instructions (https://github.com/perftools/xhgui), but this error message keeps appearing in error logs : "xhgui - document to insert contains invalid key: keys cannot contain ".":…
FLX
  • 2,626
  • 4
  • 26
  • 57
4
votes
1 answer

How do I get XHprof to start profiling?

I have installed xhprof on debian 7 using php5-xhprof This created a file /etc/php5/fpm/conf.d/20-xhprof.ini In that ini file I added xhprof.output_dir="/tmp/xhprof" I created the file /tmp/xhprof with 755 www-data:www-data I can confirm that php…
DAB
  • 1,303
  • 14
  • 23
4
votes
1 answer

Does xhprof log the file where the function came from?

I'm using xhprof for profiling an application. What I need to know is which file each function comes from, because some of the functions are global and some have duplicate names (it's legacy code, don't judge! ;) From what I could see xhprof doesn't…
Kat
  • 323
  • 2
  • 8
4
votes
2 answers

Installing XHProf on Ubuntu Server

I have tried the following tutorials, as well as others: http://akyl.net/how-install-xhprof-profiler-ubuntu http://erichogue.ca/2011/03/linux/profiling-a-php-application/ I am continually getting the following error message(s): running:…
Nicholas Yost
  • 266
  • 6
  • 15
3
votes
2 answers

Where do I get XHProfLive for XHProf?

I've read a long page about XHProfLive, but I didn't manage to find where to download it. Where do I find it? http://www.facebook.com/note.php?note_id=62667953919 I am aware that XHProf comes with some UI, but I didn't find anything more advanced…
Gajus
  • 69,002
  • 70
  • 275
  • 438
3
votes
1 answer

How to read .xhprof files?

I have .xhprof files generated from XHProf and UProfiler. Tried using SugarCrm XHProf Viewer and UProfiler viewer, but both of them doesn't read .xhprof files. Do I have to do any conversion to read this reports?
karthikeayan
  • 4,291
  • 7
  • 37
  • 75
3
votes
1 answer

How to use Tideways on own server?

Tideways is a PHP profiling extension (further development of XHProf, working with PHP 7) and provides also on tideways.io a service for analyzing the profiling results. Currently I don't need the web GUI and want to use for a PHP 7 project a…
automatix
  • 14,018
  • 26
  • 105
  • 230
3
votes
1 answer

Using regex pattern match in xhprof ignore function

I am trying to profile a codeigniter application with xhprof. I am getting the report like following... Now I am trying to ignore some function during xhprof report generation. For that what I did is like following.... $ignore = array( …
jishan
  • 300
  • 1
  • 4
  • 20
1
2 3 4 5