Monday, August 22, 2011

Week 13 report

Since my project was pretty much completed already I didn't have much left to do other than to keep testing and build some additional features.

I originally had only a few regex's to pretty print the sql queries which of course doesn't work for recursing patterns of subqueries. So I've used the tokenizer from CodeMirror and the MySQL Mode to iterate through each token and pretty print it.

What I made this week:
- Rewrote the SQL Pretty printer for the Query Analyzer dialog.
- Easy editing of byte values on the Server variables page
- Lots of fixes and small adjustments

Here's a screenshot that shows the majority of what I've been building this summer:

Sunday, August 14, 2011

Week 12 report

My Project is completed. The only thing that is left to do is to improve the code style, write some documentation on the phpMyAdmin wiki, fix any occurring bugs and tweak some things here and there.
I still added a new feature this week which took a lot of rewriting in the monitor code. It is now very easy to add preset charts over calculated values. I've already added two, which is for Query cache efficiency and Query cache usage (%). The reason why I had to rewrite a lot is because in case of the query cache usage, it also required a server variable (query cache size). So I've adjusted the chart configuration code to be more generic about the required data.

What I did this week:
- One new feature: Preset charts over calculated values. Newly added: Query cache efficiency and query cache usage (%).
- Improved page load performance by loading the monitor code on demand (+ other speed improvements)
- Implemented and improved the new tooltip system made by Aris
- Added and adjusted some rules for the Advisor system
- Made lots of code style improvements
- Lots of bugfixing

What I will do next week:
- Documentation
- Keep tweaking and scrubbing the code :-)
- Build stuff from my week 10 ideas list again with the leftover time

Monday, August 8, 2011

Week 11 report

This week I have been coding hard on the Advisor system that I planned for a long time. It uses the mysqltuner 2.0 config as a base, though I have added much more information about each rule/recommendation.
Here is an example rule in mysqltuner2.0
Query cache efficiency (%)|||<20|||Qcache_hits/(Com_select+Qcache_hits)*100|||query cache not efficient, consider increasing query_cache_limit.
This is how it looks in the pma version:
rule 'Query cache efficiency (%)' [Com_select + Qcache_hits > 0 && !fired('Query cache disabled')]
Qcache_hits / (Com_select + Qcache_hits) * 100
value < 20
Query cache not running efficiently, it has a low hit rate.
Consider increasing {query_cache_limit}.
The current query cache hit rate of %s% is below 20% | round(value,1)

As you can see, there is now 3 text lines. They are displayed title with 'issue','recommendation' and 'justification'. This way the user can make a more wise decision on how to improve the performance (or ignore the recommendation altogether)

This rule syntax is being parsed by a simple rules engine I have coded this week.

What I made this week:
- Advisor system:
  - Built rules file and rules parser
  - User interface that displays the recommendations
- New status variables "filter" that allows one to display the unformatted values (so one can copy and calculate own perfomance measures)
- Fixed a security issues with last weeks changes and other small improvements

What I will do next week:
- I will need to find a good way of adding i10n to the rules file
- Improve code style, write documentation etc.
- With leftover time, build some of the features from last weeks idea list (week 10 blog report)