This has been a long time coming. Sean Coates, Joel Perras, and I made an attempt a few years ago, pounding out a good start over a weekend holed up in Sean’s house. Unfortunately, once we left the momentum was gone, and it’s just gathered dust since. More recently, at True North PHP, my love for the tool was rekindled, and an off-hand remark to Mark Story led to some vague agreements about doing something eventually. Fast forward to December 2nd, and we decided to release something on Christmas.

So we are.

Mark & 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.

Why NoSQL?

I feel the data we’re storing lends itself well to the loose document format provided by NoSQL solutions. While it’s possible to normalize the information provided (in fact xhprof.io does just this), that’s not an approach that appeals to me. I’ve also had several colleagues comment that the only reason they had MySQL installed on a server was for this tool. My hope is that by allowing more nuanced querying and graphing, users will be able to better explore the data available.

Why MongoDB?

Tool familiarity. I’d love to see some effort to make it work with Couch or other solutions.

Features:

  • Collects XHProf data and stores it in MongoDB
  • Presents most recent calls on the home page
  • Simplified URL aggregation pages
  • Detailed run page

Warning

  • XHProf (the php extension) only records a single layer of call depth when recording performance metrics. Consider two functions A & B each call getData(), and getData() invokes mysql_query() in turn. If mysql_query() takes one second to return one time, and 1ms to return the other, the tool isn’t able to attach those values directly to the grandparent. XHProf only knows that mysql_query() was invoked by getData(). In practice this doesn’t tend to matter.
  • XHProf only provides inclusive times; exclusive times can be roughly calculated (with the caveat above in mind). I haven’t tested that function thoroughly, it could be filling everyone with lies.
  • We used Twig. It seemed like a good idea, then I saw the call graphs and memory usage.
  • It does not have any sort of access control mechanism built in, we’re trusting you to handle this on your own.
  • The “Custom View” page currently doesn’t graph
  • We haven’t included a tool to manage actually recording the views. This is coming soon.

The Future

Mark and I both have interest in the tool. I’ll be using it on Where’s it Up, and other WonderNetwork sites. Our goal is to be incredibly responsive when people have suggestions, pull requests, etc. To that end we’re in the market for someone with ~two hours a week to help us out in terms of managing pull requests, cleaning up code and helping keep the ball rolling. WonderNetwork will be providing a bit of cash, so this is a paid position.


Comments »

No Trackbacks
Hi Paul

I have started using XHGui with XHProf and MongoDB after the PHP Conference 2013 and am finding it so useful compared to the standard profiling to file system and then viewing an individual profile, being able to create views on the data is so helpful so thank you.

Just some questions: Firstly I cant seem to find where I can access the callgraphs from the specific run? Has this been taken out?

Also I see you have a branch called drilldown-ui and have tried it out. Is really nice to be able to drill into each method and see the stats on each call. Is this still in development? Is this why its not in the master branch?

Just an FYI I created a new header file which can be used on CLI scripts, and in my situation a CLI script that continuously runs (so the shutdown function doesnt work and some of the parameters like $_SERVER['REQUEST_TIME'] never changes) so have adjusted your original header file so that I can get around this and seems to log really nicely.

Anyways good work on this application
Andrew Kew
#1 Andrew Kew (Homepage) on 2013-02-28 16:28 (Reply)


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
 

Hi, I’m Paul Reinheimer, a developer working on the web.

I wrote a book titled Professional Web APIs with PHP back in 2006, and am currently working in Biomedical Informatics for a major public health company.

I’m working on a project to help developers called WonderProxy which has proxies all over the world. Working on GeoIP development? Now you can finally test properly! We've also released Global Ping Statistics for expected ping times between cities, as well as a Load Testing Tool to measure your site's ability to handle load. Our most recent site checking tool is Where's it Up? which checks your sites availability globally, returning HTTP, DNS, and Traceroute details

My hobbies are cycling, photography, travel, and engaging Allison Moore in intelligent discourse. I frequently write about PHP and other related technologies.

I co-founded:

WonderNetwork Logo

Search