News Feed
Sections




News Archive
feed this:

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

Qandidate.com:
Setting up XHProf/XHGui profiling with Ansible
November 28, 2013 @ 17: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.

0 comments voice your opinion now!
xhprof xhgui ansible install configure tutorial

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

Adam Culp:
XHProf PHP Profiling
August 05, 2013 @ 09:03:35

Adam Culp has posted to his site about some of his experiences with XHProf and profiling his PHP applications.

Today I set up my development environment so I can use XHProf to profile PHP scripts when needed, and it was pretty easy. [...] XHProf is a PECL package, and can be easily installed by using standard PECL commands.

He walks you through the installation of the PECL package (you'll need to use the command line for this one) and how to add the module to your php.ini to enable it. Once you restart your web server, you can start the debugging using the xhprof_enable function and then the xhprof_disable function to end the testing and retrieve the data for processing. He also includes a bit of output from his own pass-through script to show the results.

0 comments voice your opinion now!
xhprof profiling install tutorial debug

Link: http://www.geekyboy.com/archives/718

Lorna Mitchell:
Installing XHGui
March 07, 2013 @ 12: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.

0 comments voice your opinion now!
xhgui xhprof profile application installation pecl mongodb


Paul Reinheimer:
XHGui and MongoDB
December 26, 2012 @ 10: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.

0 comments voice your opinion now!
xhgui mongodb database nosql profile xhprof data performance


PHPMaster.com:
The Need for Speed Profiling with XHProf and XHGui
September 03, 2012 @ 10: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 Rethans' Xdebug 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.

0 comments voice your opinion now!
xhprof profile optimize xhgui tutorial install


NetTuts.com:
Advanced CodeIgniter Profiling With XHProf
April 18, 2012 @ 13:12:18

On the NetTuts.com site today there's a new tutorial showing how to use XHProf to profile CodeIgniter-based applications and fidn the spots that are causing the most overhead/issues.

XHProf will provide you with a hierarchical profile of the functions your application calls, allowing you to follow the chain of events that lead up to resource intensive code running. You'll be able to see exactly how much wall time (the actual time elapsed), CPU time and memory your application uses. This tutorial will help you get XHProf installed on your server, and integrated with your CodeIgniter application via hooks so that you can start profiling your application, in a production environment, straight away. Everything you see here was written for Ubuntu 10.04 - the latest LTS release at the time of writing.

They walk you through the installation of the tool (via a wget of the source), show you how to integrate it with CodeIgniter via hooks and include a simple class that is called to execute and report on the findings. Some sample output is included as well as some general tips on interpreting the results.

0 comments voice your opinion now!
codeigniter profile xhprof framework


Kurt Payne's Blog:
User register_tick_function to profile your code
February 07, 2012 @ 13:26:23

Kurt Payne has a new post to his blog showing how to use register_tick_function with a callback to help benchmark and profile your application to find its pain spots.

A profiler gives you the ability to trace the performance of your code through every function call and create an overview of your system's performance over a certain time period and helps you make intelligent decisions about where to look for problems. [...] But what if you're in an environment where you can't install [the xdebug or xhprof] extension? Luckily, php has a built-in function called register_tick_function that gives you a way to hook in to every user function that's called. With this, you can write a profiler yourself.

A bit of sample code illustrates his method - it defines a "do_profile" function and assigns it with the register_tick_function call. This function generates a debug backtrace and echos out the function path it took to get to that spot (output is included). He provides code for a bit more useful profiling and points out that it could easily be graphed to help visualize the problems. Also included are a few caveats to watch out for when using this method of profiling.

0 comments voice your opinion now!
registertickfunction profile graph performance xdebug xhprof


DZone.com:
Speed Up Your PHP Like Facebook
November 29, 2011 @ 10:13:03

On DZone.com John Esposito reminds you about another technology Facebook has introduced to the world of PHP (besides HipHop) - XHProf, a PHP profiler.

Facebook did more for PHP: they also created XHProf, a PHP profiler with a (supposedly) easy-to-use HTML interface, designed to pinpoint exactly where your bottlenecks are appearing, so that you can optimize at every stage in the pipeline. [...] If you haven't tried XHProf, you might want to look into it. Installation apparently requires a little nudging, but Nick Lewis just posted a full, practical guide to benchmarking and performance tuning your PHP and MySQL, using XHProf (as well as other techniques) -- a very nice overview of many common bottlenecks and how to open them up.

There's also a link to some Drupal 6 benchmarks that shows how it has helped that project (including both small and large improvements).

0 comments voice your opinion now!
facebook hiphop xhprof profiler speed performance


DZone.com:
Profiling a PHP Application
April 18, 2011 @ 11: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:

0 comments voice your opinion now!
profile application siege xhprof xhgui xdebug


Paul Reinheimer's Blog:
XHGui Improvements
June 15, 2010 @ 11:03:01

Paul Reinheimer has posted about some updates to a profiler project he's been working on, XHProf, with some new GUI improvements thanks to Highcharts. XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based user interface.

I merged my Highcharts branch into master today, including a bunch of improvements to the GUI for XHProf including: using Highcharts for graphing URLs over time, which allows for multiple axis per graph, adding a pie chart to the individual run page to show where time was spent on page load, ability to merge various calls for display within the pie chart (e.g. mysql_* into mysql), switched to the javascript tablesorter for the single run results, filter to allow you to view results only from a specific server or domain

You can see two screenshots of this new feature in action here and here. If you'd like to give the tool a try, you can grab the latest version from github.

0 comments voice your opinion now!
gui improvement xhprof profiler highcharts



Community Events





Don't see your event here?
Let us know!


security composer series community library release symfony tool artisanfiles conference list laravel voicesoftheelephpant introduction framework language podcast opinion interview version

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework