Simplify parse_diskstats_line() and _calc_delta_for(). Use UPPERCASE for constants. Don't save unused values in dev stats array. Use actual values from an OptionParser/pt-diskstats.

This commit is contained in:
Daniel Nichter
2012-01-12 10:09:40 -07:00
parent 3165b3c0f8
commit 8d70a272fe
4 changed files with 84 additions and 126 deletions

View File

@@ -26,7 +26,8 @@ BEGIN {
}
my $o = new OptionParser(description => 'Diskstats');
$o->get_specs( File::Spec->catfile($trunk, "bin", "pt-diskstats") );
$o->get_specs("$trunk/bin/pt-diskstats");
$o->get_opts();
{
my $obj = new Diskstats(OptionParser => $o);
@@ -559,3 +560,8 @@ EOF
);
}
# ###########################################################################
# Done.
# ###########################################################################
exit;