Latency Tracker: PHP/mySQL tracking for WordPress

Overview

I’ve had some online friends complain lately that the speed of their WordPress install seems fast one day, slow the next, and mediocre the next. To give them some concrete data, I created the LatencyTracker plugin for WordPress. This really simple plugin hooks into your wp_footer function (so make sure that your theme uses it) to count the number of queries, how long they took, how much memory was use, and when it all occurred. That way, they can show some solid data to the host so that they are able to compare numbers and know for sure that their load times are faster or slower when compared.

Install

  1. Download the zip at the bottom of this post and extract somewhere memorable on your storage device.
  2. Upload the latency-tracker folder to your wp-content/plugins/ folder.
  3. Log in to your WordPress dashboard and go to the plugins page.
  4. Activate the plugin

Uninstall

  1. Log in to your WordPress dashboard and go to the plugins page.
  2. Deactivate the plugin. This will remove the table storing your data and remove the option info from your wp_options table.
  3. Delete the latency-tracker folder in your wp-content/plugins/ folder

FAQ

  • Which versions of WordPress have you tested it with?
    WordPress 2.6+, 2.7+, 2.8+, 2.9+, 3.0+
  • Will it work with my theme?
    It should. Make sure that you footer.php in your theme folder includes a call to wp_footer(); or it won’t work.
  • This is stupid, it just stores data to a table and causes my site to slow down!
    Sorry, it is my first WP plugin, and I’m trying to fill a very specific need, track PHP/mySQL response times.
  • My friends site is faster/slower then mine!
    Each host is different. Mirror your site on another server for apples to apples comparison of the data.

Admin panel screen shots

Averages

Graph

Recent requests

Download

Get the latest version from the WordPress Plugins directory.

16 thoughts on “Latency Tracker: PHP/mySQL tracking for WordPress

  1. Pingback: Updated PHP/mySQL Wordpress Latency Tracker to 1.3 | SKFox

  2. Pingback: Latency Tracker updated to version 1.5 | SKFox

  3. Pingback: Still Alive | SKFox

  4. Pingback: Latency Tracker plugin for Wordpress updated to version 2.0 | SKFox

  5. This is very good – works great on my wordpress installs but I use another mysql program called website baker as well as other mysql based applications. Could this be made into a stand alone program with appropriate calls installed on the footer of the program you wish to monitor? If so this would be great. I think it would gain wide appeal, many people would like the opportunity to monitor the performance of their mysql based applications across different hosting environments. Thanks

  6. @Robert: I guess it could be, it’s not that hard to do. Take a look at the source and it should be pretty easy to port.

  7. I installed it on my blog, but I am getting this on the admin site:

    Error: this._each is not a function
    Line: 593

  8. That’s odd, it’s only 341 lines long, so I’m not entirely sure what the problem could be. Is it coming from PHP or is it a Javascript error?

  9. Ah, it is in the prototype library… guess I shall have to look elsewhere to figure it out?

    It is in: Prototype -> Enumerable

    Could be a conflict with jQuery or something I guess.

  10. I tried to set it up so as to minimize collisions between the JS libraries in WP. I’ll take a look at this end and see if I can’t do more for that. Thanks for reporting the problem.

  11. Pingback: Goodbye Media Temple, hello Web Faction | SKFox

  12. Pingback: Wordpress Latency Tracker updated to 2.1 « SKFox.com

  13. I recently had to move my site away from hostgator – slow Mysql performance – and when I re-installed on another hosting company wordpress was installed at the latest level – 2.9.2 at the other host. Now latency tracker does not work. I tried uninstalling and re-installing and it just keeps saying not enough records to track.

    Since I moved other wordpress sites also I tried a fresh install on one of them that formerly did not have latency tracker installed, also at 2.9.2 and it seems to be tracking but the page that shows the records will not show the stats.

    It says 190 records and shows the tabs that say “data” “graph” “records” but will not show anything below the tabs.

    This is in firefox and in Mozilla seamonkey. did not try it in IE because it always worked in firefox before.

    Any ideas? or is an update needed for it to work again?

    By the way, I still am interested in having Latency Tracker as a universal application that could be installed and could track Mysql performance in any Mysql based application, So shaun if you would like to make a few bucks email me.

    I would like it to have the capability to have a publicly available page or the option to keep the stats private. I would like it to report the performance back to a main site so the over all mysql performance of most hosting companies could be reported via all the latency tracker installs out there.

    When installing the program the site owner could fill out who they where hosted with and that data could be reported back to the main site/server maybe via rss or something like that, then the data could be made into performance graphs for each hosting company. People visiting the site could view this and make better choices when planning a Mysql based site.

    Since many websites are CMS based as in wordpress etc this could be very useful data to many people.

    A good example is media temple.

    This company has a great reputation as a reliable host but they have gone to a new system called grid servers. This system is the worst performing thing I have ever seen when it comes to Mysql performance. I could write 10,000 words about the money and time wasted by me moving one of my large sites and many customer sites to this company, finding out how they SUCK SUPER HARD then having to move all these Mysql based sites away from them.

    Hostgator is another perfect example. I signed on with them with the aluminum reseller package and moved about 5 sites over. 4 of them were wordpress based and one was a static site. The static site ran fine but the 4 wordpress sites ran s-l-o-w…..

    I have my own servers plus reseller packages with other hosting companies and know how to track this stuff. Latency tracker is a large part of this so I really hate to lose it as a means to keep track of mysql performance across multiple hosting companies including my own servers.

    I there were a system out there based on a stand alone version of latency track where I could have gone to find out the performance data for these two companies before I actually sign on with them I could have avoided all the time and expense of signing on and moving sites to them only to have to move all the same sites away from them 3 months later. What a total pain in the A$$ this was.

    When I get ideas like this I really wish I could write programs on my own but I am just to darn busy these days to take on learning to write and program php etc.

    Any programmers out there want to take this on? contact me at ncwonline at gmail.com

    If you email me and I don’t reply try again as the gmail spam system some times is a little too aggressive and emails end up there that should not and I don’t always catch it. If you email me about this I will reply.

    I would really like to make this Mysql performance information on each hosting company available to the public. I have the servers and equipment to run the back end but I don’t have a large budget to hire and pay for a big programming job right now as my company is quite small and under funded.

    I see this as doing something for the public good. If any programmers want to take this on and do it for a reasonable cost let me know. I wish Shaun could/would do it but if he is too busy or not interested then I need to find some one who is a programmer and is willing to help.

    ###

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.