I would like to estimate mean request time for MySQL queries (all). I would like to do so in order to measure quality of service, but overall to measure the benefits of new techniques taken.

I already do so for number of queries per hour, this is quite easy. For info, I run my own server (on linux) and have shell access. Furthermore, all queries are logged; therefore, measuring mean queries time can be done in bash, for example, or another language.

Would anyone have a clue of how to do so.

Thanks in advance.