Created
August 8, 2013 01:53
-
-
Save tnmt/6180789 to your computer and use it in GitHub Desktop.
fioの出力をgithub wikiのtable形式にフォーマットする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
print <<EOT; | |
- | bandwidth | iops | |
--------------|-------------|-------- | |
EOT | |
while ( defined(my $line = <>) ) { | |
next unless $line =~ /^(.+):.*groupid=/o; | |
my $group = $1; | |
my $result = <>; | |
my ( $bw, $iops ) = $result =~ /bw=(.*?),.*iops=(.*?),/; | |
printf " %-12s | %11s | %7s\n", | |
$group, | |
$bw, | |
$iops; | |
} | |
print "\n"; | |
=head1 NAME | |
pretty_format.pl | |
=head1 SYNOPSIS | |
fio hogehoge | tee /tmp/fio.log | ./pretty_format.pl | |
=head1 DESCRIPTION | |
fioの出力をgithub wikiのtable形式にフォーマットする。 | |
=head1 AUTHOR | |
<[email protected]> | |
=head1 SEE ALSO | |
=cut |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment