Comments on: Version 1.6.0 of the innotop monitor for MySQL released http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/ Stay curious! Mon, 13 May 2013 05:55:40 +0000 hourly 1 http://wordpress.org/?v=3.5.1 By: Alexey Kovyrin http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13674 Alexey Kovyrin Sun, 11 Nov 2007 04:37:06 +0000 http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13674 Thanks for your really detailed comments and especially for an example.

]]>
By: Xaprb http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13672 Xaprb Sat, 10 Nov 2007 23:21:36 +0000 http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13672 Hi Alexey,

It’s not always easy to test interactive scripts. I have very little of innotop tested. I wrote the InnoDB parser with tests, but the rest of it is basically untested. I regret this decision.

The basic way to test everything is to put it into a module and use the Test::More module, which is part of standard Perl distributions. I have sometimes taken the approach of embedding modules into scripts to make them “runnable modules” that can still be tested. You can see an example of that here:

http://mysqltoolkit.svn.sourceforge.net/viewvc/mysqltoolkit/trunk/mysql-log-parser/

You usually create a t/ subdirectory and place .t files in it, then you can either run them with perl or just enter that directory and type ‘prove’ to run them all.

One of my goals for innotop in the future is to extract a lot of the code, and put it into modules and test it. Some of the interactive stuff is hard to test, as I said, but a lot of it is easy, like the code that formats things to print out as tables.

]]>
By: Alexey Kovyrin http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13671 Alexey Kovyrin Sat, 10 Nov 2007 23:04:54 +0000 http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13671 Hi, Baron,

I’d like to ask, how do you perform a tests on your perl code? I’m going to cover MMM with a test suite, but not sure what approach (and modules, etc) to choose. After a year with Ruby and its awesome testing frameworks I simply don’t know how to deal with perl’s crappy situation with testing :-/

]]>
By: Dormando http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13668 Dormando Sat, 10 Nov 2007 04:18:02 +0000 http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13668 Done, sent two to sourceforge. Thank you!

]]>
By: Xaprb http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13666 Xaprb Fri, 09 Nov 2007 22:42:27 +0000 http://www.xaprb.com/blog/2007/11/09/version-160-of-the-innotop-monitor-for-mysql-released/#comment-13666 Would you mind submitting bug requests? I’ll forget otherwise :)

Thanks!

]]>