#!/usr/bin/perl

# This script parses the output of `sysbench --test=cpu`, presenting the
# info in a structure more ameniable to post-processing tools for test
# reports
# Usage:  parse_sysbench_cpu < cpu.output

use strict;
use warnings;
use Test::Parser::SysbenchCPU;

my $parser = new Test::Parser::SysbenchCPU
    or die "Couldn't create Test::Parser::SysbenchCPU object\n";

$parser->parse($ARGV[0] or \*STDIN)
    or die "Could not parse Sysbench log.\n";

print $parser->to_xml();