Saturday, April 30, 2011

Some better colors for charts

I've decided to browse through some of the phpMyAdmin code in order to get more familiar with it.
So I started my day by looking through all the include files of server_status.php (finding all kinds of curiosities like /* We must do hard way... but almost no chance to execute this */) and somehow ended up with recoding the chart classes to make them use theme-specific colors, since I found those green colors awfully unfitting from the day I saw them. Also, when I'm going to rebuild the Status page, I don't want to have green graphs there ;)

So this is the result in the themes original and pmahomme (before/after pics):


Since there was such a nice 'layout.inc.php' in each theme folder defining some colors, I thought it'd be best place to put the color definitions.

I will be posting the patch to the mailing list and push the changes to my repos once I figured out how it works :|

Tuesday, April 26, 2011

GSoC 2011: More Statistics for the status page

I am very delighted to hear that my proposal for 'Query statistics & charts for the status page' has been accepted to the Google summer of Code Program.

In the course of the next few months I will turn the phpMyAdmin Status page from a plain collection of server variables into a sophisticated query statistics and analytics tool, as well as server health statistics. But I also really would like to add some completely unplanned improvements since I always get countless ideas what could be done better while I'm coding. However, I will make sure that it's actually useful for everyone by communicating actively about my progress and ideas on the pma mailing list.

Here is a short summary of what I've planned, for now:
  • Restructure the status page. Organize status variables into jQuery Tabs.

  • Add some code that allows for recording of server status data, and use those in return to generate graphs about the general server health. In the process of this I would also like to make sure that the configuration of the database (where the data will be stored in) can be done easily through the phpMyAdmin interface, and not through the config.inc.php. Unfortunately this feature will be limited to users that have the possibility to set up cronjobs.

  • With the help of MySQLs slow_query_log we can extract a bunch of very useful graphs such as:
    • Amount of queries by user
    • Amount of queries vs time chart, to help identify at what times the server is more busy
    • List of particularly slow queries
    • Common queries that use non-indexed fields in the WHERE Statement, which is a well known performance pitfall.

  • To some degree, I'd like to develop a tool that helps with optimizing queries. I would do this by looking at well known optimization techniques and trying to identify programmatically where they could be applied to.

I am very excited in implementing these features, since I regularly use phpMyAdmin myself and always enjoy looking at the statistics. So these changes will benefit me directly when working on future Website projects.

Lastly I would like to thank the phpMyAdmin Mentors for choosing my project and Google for this amazing program!