Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Rob Allen:
Installing XHGui via Ansible
Apr 14, 2015 @ 15:50:47

Rob Allen has posted a guide to his site today showing how to install XHGui via Ansible. XHGui is a graphical interface to view the results of XHProf, a performance evaluation tool.

I'm still using Ansible to provision Vagrant VMs. This is how I added the XHGui profiler to my standard setup.

He walks you through the five steps his process follows to get the necessary software installed and configured to get up and running:

  • Install Composer
  • Install the uprofiler PHP extension
  • Install XHGui
  • Set up for profiling
  • Set up host for XHGui website

Each step includes the commands to execute or the lines to add/update to the configurations to get the system up and working.

tagged: tutorial install xhgui xhprof ansible build vagrant vm virtualmachine

Link: http://akrabat.com/installing-xhgui-via-ansible/

Lorna Mitchell:
XHGui on VM, Storage on Host
Jan 05, 2015 @ 18:09:08

Lorna Mitchell has a new post today showing you how you can use XHGui in a virtual machine, sorting the resulting performance data on the VM rather than your local machine.

I'm doing some performance tuning on a project at the moment and my favourite tool is still XHGui - but it's designed to run on the same machine as its victim and since this is a vagrant VM, the chances of me destroying the machine and therefore the data are pretty high! Instead, I set it up to store the data onto the host and I thought I'd share how I did that. All these instructions for Ubuntu on both host and guest, and I've tried not to be specific about the vagrant elements in order to focus on how the pieces fit together rather than what you should type.

She walks you through all the steps you'll need to get the software up and running as well as configuring the actual guest VM to direct the data to the right place. She sets up the data source to push the results into (a MongoDB) and configures the PHP installation with an "auto prepend" of the XHGui header file. Finally, she includes the commands you'll need to view the data on the VM itself, running the built-in PHP web server as an ad-hoc instance on the VM itself.

tagged: xhgui xhprof mongodb vm virtualmachine tutorial localhost

Link: http://www.lornajane.net/posts/2015/xhgui-on-vm-storage-on-host

Qandidate.com:
Setting up XHProf/XHGui profiling with Ansible
Nov 28, 2013 @ 23:56:51

On the Qandidate.com blog there's a new post showing how to set up the PHP profiling tool XHProf/XHGui using Ansible for setup and configuration. Ansible is a radically simple IT orchestration engine that makes your applications and systems easier to deploy.

Once in a while I think about profiling my web applications to see if I can get them to run faster. There are cool tools out there like XHProf and XHGUI to help you do exactly that. And then I remember it took me quite some time to get it all set up... But now that I've started using Ansible I decided to document the set up process and share it with you. Today I will walk you through my Ansible role for setting up everything you need for profiling your first PHP script.

He starts with a checklist of things to be sure you have installed first (including XHProf and XHGui) and links to his yml configuration to run a "profiling" command. An example of the result (the XHGui HTML output) is also included.

tagged: xhprof xhgui ansible install configure tutorial

Link: http://labs.qandidate.com/blog/2013/11/28/setting_up_xhprof_xhgui_profiling_with_ansible/

Inviqa techPortal:
Profiling PHP Applications with XHGui
Oct 03, 2013 @ 15:53:32

On the Inviqa techPoral today there's a new post from Lorna Mitchell showing you how to profile your PHP applications with the help of the XHGui tool (and XHProf extension).

Profiling is a technique for observing the performance of an application, ideal for showing up bottlenecks or particularly intensive use of resources. Profiling gets inside your application and gives information about the performance of the various parts of code that are used during a request. [...] We have a choice of tools for PHP but in this article we’ll focus on an excellent tool called XHGui. XHGui is a tool built upon XHProf, the profiling tool released by Facebook, but adding better storage of metrics and a much nicer interface for retrieving information from it, to the extent that it feels like a new tool in it’s own right!

She walks you through the full installation, including other things the tool depends on (like MongoDB and the XHProf extension). She shows how to run the installer, configure a virtual host correctly (using mod_rewrite) and some example screenshots of what the resulting statistics report. This includes things like "wall time" and parts of the application that may be "memory hogs". There's also an example of a handy feature called the "Callgraph" that shows you a visual representation of the performance of the execution of the app.

tagged: techportal xhgui profile performance application xhref tutorial install configure

Link: http://techportal.inviqa.com/2013/10/01/profiling-php-applications-with-xhgui/

Lorna Mitchell:
Installing XHGui
Mar 07, 2013 @ 18:15:01

Lorna Mitchell has a new post today showing you how to install XHGui to help with profiling your application for performance and processing issues.

If you're not familiar with XHGui it's a fabulously easy and friendly way to profile your application; to understand which method calls in a page take the time and how many times they are made, so you can improve the performance of your application. All these instructions are for my 32-bit Ubuntu 12.10 system, hopefully they will work for you or you'll be able to adapt them as appropriate.

She lists the dependencies you'll need to have installed before you can get XHGui working correctly including a MongoDB instance and the PECL xhprof extension. With those all set to go, you can go grab the latest XHGui from github and drop it into place.

tagged: xhgui xhprof profile application installation pecl mongodb

Link:

Paul Reinheimer:
XHGui and MongoDB
Dec 26, 2012 @ 16:02:01

Paul Reinhemier has written up post sharing his creation of the code to get XHGui working with MongoDB.

Mark Story & I are pleased as punch to introduce XHGui on MongoDB. Our goal was to get as close to the original feature set of the tool I worked on a few years ago (which leveraged the starting point provided by Facebook) and then to release what we had. What we’ve got now works; there’s still a good distance to go, but we think it’s far enough that we can ask for help form the community at large.

The tool collects XHProf data and stores it into a MongoDB database and allows you to view recent activity. There's a few warnings that he includes with the post, so be sure to read those through if you plan on using the tool.

tagged: xhgui mongodb database nosql profile xhprof data performance

Link:

PHPMaster.com:
The Need for Speed: Profiling with XHProf and XHGui
Sep 03, 2012 @ 15:29:13

On PHPMaster.com today Matt Turland has an article posted about using XHProf and XHGui to find the performance issues in your application and profile them to help optimize things.

Profiling is the process of measuring the execution time of each function or method call involved in servicing a single page request. The data collected from this process can reveal issues such as a particular method taking a long time to execute or being called a large number of times. Profiling a PHP script generally requires installing a PHP extension. The two more popular extensions for this purpose are Derick RethansXdebug and Facebook’s XHProf. This article will focus on XHProf.

He walks you through the installation of both and shows you some sample results of the profiling of a simple application and how you can compare the results across profiling runs. Additionally, if you install graphviz support, you can generate the call stack output in a visual form to make for easier consumption.

tagged: xhprof profile optimize xhgui tutorial install

Link:

DZone.com:
Profiling a PHP Application
Apr 18, 2011 @ 16:09:33

On DZone.com's Web Builder Zone today there's a new post from Eric Hogue talking about some of the tools you can use to profile your PHP application and squeeze that much more performance out of it (or maybe just find that pesky, elusive bug).

When developing web applications, we often run into performance issues. People often blame PHP or MySQL for bad performance, but in most case the answer is not that easy. Blindly trying to optimize random parts of our applications can lead to some uneven results. There are many available tools to profile a PHP application. Learning how to use them can help us pinpoint which parts are slow. With this information we can pick the optimizations that will give us the best results.

The helpful tools he mentions include:

tagged: profile application siege xhprof xhgui xdebug

Link:

Eric Hogue's Blog:
Profiling a PHP Application
Apr 01, 2011 @ 15:02:53

Eric Hogue has written up a new post about a few different technologies you can use to profile your PHP applications quickly and easily.

There are many available tools to profile a PHP application. Learning how to use them can help us pinpoint which parts are slow. With this information we can pick the optimizations that will give us the best results. This post describes the installation and configuration of some of them. I tested them in a Ubuntu 10.10 virtual machine. If you want to try those tools, don’t forget that they can greatly impact the performance of you web server when they are active. Installing a tool like Xdebug on a production server is not recommended.

First he looks at benchmarking your application with a tool called Siege, a load testing tool that can be configured to send requests to your application in lots of different ways. He also mentions Xdebug, a handy debugger and XProf, a profiling tool to help find the bottlenecks in your code (and XHGui to view its results).

tagged: profile application xdebug siege xprof xhgui

Link:


Trending Topics: