Commit c3a9841d authored by Kevin Harms's avatar Kevin Harms

Add table that display amount of data transferred on a per-filesystem basis


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@280 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 980cf436
......@@ -70,6 +70,8 @@ my $current_rank = 0;
my $current_hash = 0;
my %file_record_hash = ();
my %fs_data = ();
while ($line = <TRACE>) {
chop($line);
......@@ -169,18 +171,28 @@ while ($line = <TRACE>) {
$cumul_meta_indep += $fields[3];
}
if (($fields[2] eq "CP_BYTES_READ") or
($fields[2] eq "CP_BYTES_WRITTEN") and
not defined($fs_data{$fields[5]}))
{
$fs_data{$fields[5]} = [0,0];
}
if ($fields[2] eq "CP_BYTES_READ" && $fields[0] == -1){
$cumul_read_bytes_shared += $fields[3];
$fs_data{$fields[5]}->[0] += $fields[3];
}
if ($fields[2] eq "CP_BYTES_READ" && $fields[0] != -1){
$cumul_read_bytes_indep += $fields[3];
$fs_data{$fields[5]}->[0] += $fields[3];
}
if ($fields[2] eq "CP_BYTES_WRITTEN" && $fields[0] == -1){
$cumul_write_bytes_shared += $fields[3];
$fs_data{$fields[5]}->[1] += $fields[3];
}
if ($fields[2] eq "CP_BYTES_WRITTEN" && $fields[0] != -1){
$cumul_write_bytes_indep += $fields[3];
$fs_data{$fields[5]}->[1] += $fields[3];
}
# record start and end of reads and writes
......@@ -622,6 +634,38 @@ print TABLES "
close(TABLES);
#
# Generate Per Filesystem Data
#
open(TABLES, ">$tmp_dir/fs-data-table.tex") || die("error opening output files:$!\n");
print TABLES "
\\begin{tabular}{c|r|r|r|r}
\\multicolumn{5}{c}{ } \\\\
\\multicolumn{5}{c}{Data Transfer Per Filesystem} \\\\
\\hline
\\multirow{2}{*}{File System} \& \\multicolumn{2}{c}{Write} \\vline \& \\multicolumn{2}{c}{Read} \\\\
\\cline{2-5}
\& MiB \& Ratio \& MiB \& Ratio \\\\\
\\hline
\\hline
";
foreach $key (keys %fs_data)
{
my $wr_total_mb = ($fs_data{$key}->[1] / (1024*1024));
my $rd_total_mb = ($fs_data{$key}->[0] / (1024*1024));
my $wr_total_rt = ($fs_data{$key}->[1] / ($cumul_write_bytes_shared + $cumul_write_bytes_indep));
my $rd_total_rt = ($fs_data{$key}->[0] / ($cumul_read_bytes_shared + $cumul_read_bytes_indep));
printf TABLES "%s \& %.5f \& %.5f \& %.5f \& %.5f \\\\\n",
$key, $wr_total_mb, $wr_total_rt, $rd_total_mb, $rd_total_rt;
}
print TABLES "
\\hline
\\end{tabular}
";
close(TABLES);
open(TIME, ">$tmp_dir/time-summary.dat") || die("error opening output file:$!\n");
print TIME "# <type>, <app time>, <read>, <write>, <meta>\n";
print TIME "POSIX, ", ((($runtime * $nprocs - $summary{CP_F_POSIX_READ_TIME} -
......
......@@ -5,6 +5,7 @@
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{subfigure}
\usepackage{multirow}
%
% GET THE MARGINS RIGHT, THE UGLY WAY
%
......@@ -80,6 +81,10 @@
{
\input{file-access-table}
}
\subfigure
{
\input{fs-data-table}
}
\end{figure*}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment