Re: [MTT devel] [MTT svn] svn:mtt-svn r1481 - in trunk: client lib/MTT/Reporter

2012-08-04 Thread Mike Dubman
Hi,

We are switching from datastore (feature we added a couple of years ago) to
MongoDB NoSQL DB to keep mtt results.

We are adding some "regression" capability based on  MTT and MongoDB
reporter:

- run mtt
- when mtt finishes, extract results for previous runs of the same test
with same parameters
- compare performance metrics and generate regression report (excel)
- attach regression report to the mtt email report

So, we are adding all lego-like utils to support this:

- save results to OO storage (for comfort using from Perl)
- create Analyzers for various well-known tests
- query results, group them and generate regression statistics, place
report into excel (mongo-query.pl)
- Generate report which can be attached to mtt report (breport.pl)


So, we have reporter and query tool for Mongo, which is simple and
customizable.

regards
M


On Wed, Aug 1, 2012 at 2:00 PM, Jeff Squyres  wrote:

> Mike --
>
> MongoDB is a NoSQL thingy, right?
>
> Can you describe this plugin a bit?  Do you guys have some kind of
> reporter for MongoDB?
>
>
> On Aug 1, 2012, at 5:46 AM,  wrote:
>
> > Author: miked (Mike Dubman)
> > Date: 2012-08-01 05:46:03 EDT (Wed, 01 Aug 2012)
> > New Revision: 1481
> > URL: https://svn.open-mpi.org/trac/mtt/changeset/1481
> >
> > Log:
> > add modified version mongobquery and MTTMongodb
> >
> > Added:
> >   trunk/client/mongobquery.pl   (contents, props changed)
> >   trunk/lib/MTT/Reporter/MTTMongodb.pm
> >
> > Added: trunk/client/mongobquery.pl
> >
> ==
> > --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> > +++ trunk/client/mongobquery.pl   2012-08-01 05:46:03 EDT (Wed, 01
> Aug 2012)  (r1481)
> > @@ -0,0 +1,1018 @@
> > +#!/usr/bin/perl
> > +#
> > +# Copyright (c) 2009
> > +# $COPYRIGHT$
> > +#
> > +# Additional copyrights may follow
> > +#
> > +# $HEADER$
> > +#
> > +# Now that @INC is setup, bring in the modules
> > +
> > +#use strict;
> > +#use warnings;
> > +use LWP::UserAgent;
> > +use HTTP::Request::Common;
> > +use Data::Dumper;
> > +use File::Basename;
> > +use File::Temp;
> > +use Config::IniFiles;
> > +use YAML::XS;
> > +use MongoDB;
> > +use MongoDB::OID;
> > +use YAML;
> > +use YAML::Syck;
> > +use DateTime;
> > +
> > +###
> > +# Set variables
> > +###
> > +my $module_name=$0;
> > +my $module_path=$0;
> > +
> > +$module_name=~s/([^\/\\]+)$//;
> > +$module_name=$1;
> > +
> > +$module_path=~s/([^\/\\]+)$//;
> > +
> > +
> > +###
> > +# Main block
> > +###
> > +use Getopt::Long qw(:config no_ignore_case);
> > +
> > +my $opt_help;
> > +my $opt_server;
> > +my $opt_username;
> > +my $opt_password;
> > +
> > +my $opt_ping;
> > +my $opt_upload;
> > +my $opt_query;
> > +my $opt_view;
> > +my $opt_admin;
> > +
> > +my @opt_data;
> > +my @opt_raw;
> > +
> > +my $opt_gqls;
> > +my @opt_gqlf;
> > +my @opt_section;
> > +my $opt_dir;
> > +my $opt_no_raw;
> > +
> > +my $opt_dstore;
> > +my $opt_info;
> > +my $opt_format;
> > +my $opt_mailto;
> > +my $opt_regression_from;
> > +my $opt_regression_to;
> > +my $opt_regression_step;
> > +
> > +my @opt_newuser;
> > +
> > +GetOptions ("help|h" => \$opt_help,
> > +"server|a=s" => \$opt_server,
> > +"username|u=s" => \$opt_username,
> > +"password|p=s" => \$opt_password,
> > +"ping" => \$opt_ping,
> > +"upload" => \$opt_upload,
> > +"query" => \$opt_query,
> > +"view" => \$opt_view,
> > +"admin" => \$opt_admin,
> > +
> > +"data|S=s" => \@opt_data,
> > +"raw|R=s" => \@opt_raw,
> > +
> > +"gqls|L=s" => \$opt_gqls,
> > +"gqlf|F=s" => \@opt_gqlf,
> > +"section|T=s" => \@opt_section,
> > +"dir|O=s" => \$opt_dir,
> > +"no-raw" => \$opt_no_raw,
> > +
> > +"dstore|D" => \$opt_dstore,
> > +"info|I=s" => \$opt_info,
> > +"format|V=s" => \$opt_format,
> > +"email|e=s" => \$opt_mailto,
> > +
> > +"newuser=s{3,5}" => \@opt_newuser,
> > +
> > + "regression-from=s" => \$opt_regression_from,
> > + "regression-to=s" => \$opt_regression_to,
> > + "regression-step=s" => \$opt_regression_step
> > +);
> > +
> > +
> > +my $url = ();
> > +my $username = ();
> > +my $password = ();
> > +
> > +$url = $opt_server ? $opt_server : "http://bgate.mellanox.com:27017;;
> > +$url =~ s/http:\/\///;
> > +$username = $opt_username ? $opt_username : "admin";
> > +$password = $opt_password ? $opt_password : "";
> > +
> > +my %conf = ('url' => "$url\/client",
> > +'username' => $username,
> > +  

Re: [MTT devel] [MTT svn] svn:mtt-svn r1481 - in trunk: client lib/MTT/Reporter

2012-08-01 Thread Jeff Squyres
Mike --

MongoDB is a NoSQL thingy, right?

Can you describe this plugin a bit?  Do you guys have some kind of reporter for 
MongoDB?


On Aug 1, 2012, at 5:46 AM,  wrote:

> Author: miked (Mike Dubman)
> Date: 2012-08-01 05:46:03 EDT (Wed, 01 Aug 2012)
> New Revision: 1481
> URL: https://svn.open-mpi.org/trac/mtt/changeset/1481
> 
> Log:
> add modified version mongobquery and MTTMongodb
> 
> Added:
>   trunk/client/mongobquery.pl   (contents, props changed)
>   trunk/lib/MTT/Reporter/MTTMongodb.pm
> 
> Added: trunk/client/mongobquery.pl
> ==
> --- /dev/null 00:00:00 1970   (empty, because file is newly added)
> +++ trunk/client/mongobquery.pl   2012-08-01 05:46:03 EDT (Wed, 01 Aug 
> 2012)  (r1481)
> @@ -0,0 +1,1018 @@
> +#!/usr/bin/perl
> +#
> +# Copyright (c) 2009
> +# $COPYRIGHT$
> +# 
> +# Additional copyrights may follow
> +# 
> +# $HEADER$
> +#
> +# Now that @INC is setup, bring in the modules
> +
> +#use strict;
> +#use warnings;
> +use LWP::UserAgent;
> +use HTTP::Request::Common;
> +use Data::Dumper;
> +use File::Basename;
> +use File::Temp;
> +use Config::IniFiles;
> +use YAML::XS;
> +use MongoDB;
> +use MongoDB::OID;
> +use YAML;
> +use YAML::Syck;
> +use DateTime;
> +
> +###
> +# Set variables
> +###
> +my $module_name=$0;
> +my $module_path=$0;
> +
> +$module_name=~s/([^\/\\]+)$//;
> +$module_name=$1;
> + 
> +$module_path=~s/([^\/\\]+)$//;
> +
> +
> +###
> +# Main block
> +###
> +use Getopt::Long qw(:config no_ignore_case);
> +
> +my $opt_help;
> +my $opt_server;
> +my $opt_username;
> +my $opt_password;
> +
> +my $opt_ping;
> +my $opt_upload;
> +my $opt_query;
> +my $opt_view;
> +my $opt_admin;
> +
> +my @opt_data;
> +my @opt_raw;
> +
> +my $opt_gqls;
> +my @opt_gqlf;
> +my @opt_section;
> +my $opt_dir;
> +my $opt_no_raw;
> +
> +my $opt_dstore;
> +my $opt_info;
> +my $opt_format;
> +my $opt_mailto;
> +my $opt_regression_from;
> +my $opt_regression_to;
> +my $opt_regression_step;
> +
> +my @opt_newuser;
> +
> +GetOptions ("help|h" => \$opt_help,
> +"server|a=s" => \$opt_server,
> +"username|u=s" => \$opt_username,
> +"password|p=s" => \$opt_password,
> +"ping" => \$opt_ping,
> +"upload" => \$opt_upload,
> +"query" => \$opt_query,
> +"view" => \$opt_view,
> +"admin" => \$opt_admin,
> +
> +"data|S=s" => \@opt_data,
> +"raw|R=s" => \@opt_raw, 
> +
> +"gqls|L=s" => \$opt_gqls,
> +"gqlf|F=s" => \@opt_gqlf,
> +"section|T=s" => \@opt_section,
> +"dir|O=s" => \$opt_dir,
> +"no-raw" => \$opt_no_raw,
> +
> +"dstore|D" => \$opt_dstore,
> +"info|I=s" => \$opt_info,
> +"format|V=s" => \$opt_format,
> +"email|e=s" => \$opt_mailto,
> +
> +"newuser=s{3,5}" => \@opt_newuser,
> +
> + "regression-from=s" => \$opt_regression_from,
> + "regression-to=s" => \$opt_regression_to,
> + "regression-step=s" => \$opt_regression_step
> +);
> +
> +
> +my $url = ();
> +my $username = ();
> +my $password = ();
> +
> +$url = $opt_server ? $opt_server : "http://bgate.mellanox.com:27017;;
> +$url =~ s/http:\/\///;
> +$username = $opt_username ? $opt_username : "admin";
> +$password = $opt_password ? $opt_password : "";
> +
> +my %conf = ('url' => "$url\/client",
> +'username' => $username,
> +'password' => $password
> +);
> +
> +if ($opt_help)
> +{
> +my $action = '';
> + 
> +$action = 'ping' if ($opt_ping);
> +$action = 'upload' if ($opt_upload);
> +$action = 'query' if ($opt_query);
> +$action = 'view' if ($opt_view);
> +$action = 'admin' if ($opt_admin);
> +
> +help($action);
> +
> +exit;
> +}
> +elsif ($opt_ping)
> +{
> + #ping( \%conf ); 
> + #print $url," url\n";
> + my $conn = MongoDB::Connection->new(host => $url );
> + if($conn != 0)
> + {
> + print"\n\nping: success\n\n";
> + }
> +}
> +elsif ($opt_upload)
> +{
> +if ($#opt_data < 0) 
> +{
> +help('upload');
> +}
> + my @data = split(/,/,join(',',@opt_data)) if (@opt_data);
> + my @raw = split(/,/,join(',',@opt_raw)) if (@opt_raw);
> +
> +# Check if files existed
> + verify_opt_file( @data );
> + verify_opt_file( @raw );
> +
> + $conf{data} = \@data;
> + $conf{raw} = \@raw;  
> +
> + upload( \%conf ); 
> +}
> +elsif ($opt_query)
> +{
> +my $gql = ();
> +if ($opt_gqls) 
> +{
> +$gql = $opt_gqls;
> +}
> +