#!/usr/bin/env perl

use strict;
use warnings;
use Test::Parser::Sar;
use Test::Presenter::Sar;
use Getopt::Long;

my $input;
my $output = '.';

GetOptions(
    'input:s' => \$input,
    'output:s' => \$output
);

unless ($input) {
    print "usage: $0 --input <sar.out> [--output <directory>]\n";
    exit(1);
}

my $parser = new Test::Parser::Sar;
$parser->parse($input);
my $presenter = new Test::Presenter::Sar($parser->data());
$presenter->outdir($output);
$presenter->plot();
