Commit 14683fb0 authored by Philip Carns's avatar Philip Carns

2nd step to calculating performance: tabulate the time spent in shared files


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@333 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 2b2f6da6
......@@ -28,7 +28,8 @@ my @access_size = ();
my %hash_files = ();
# data structures for calculating performance
my %hash_uniq_file_time = ();
my %hash_unique_file_time = ();
my $shared_file_time = 0;
process_args();
......@@ -919,10 +920,10 @@ close(VARP);
my $slowest_uniq_time = 0;
if(keys %hash_unique_file_time > 0)
{
print values %hash_uniq_file_time;
$slowest_uniq_time < $_ and $slowest_uniq_time = $_ for values %hash_unique_file_time;
}
print("Slowest unique file time: $slowest_uniq_time\n");
print("Slowest shared file time: $shared_file_time\n");
if(-x "$FindBin::Bin/gnuplot")
{
......@@ -1171,6 +1172,32 @@ sub process_file_record
}
}
}
else
{
# cumulative time spent on shared files by slowest proc
if($major > 1)
{
# new file format
$shared_file_time += $file_record{'CP_F_SLOWEST_RANK_TIME'};
}
else
{
# old file format. Guess time spent as duration between first open
# and last io
if($file_record{'CP_F_READ_END_TIMESTAMP'} >
$file_record{'CP_F_WRITE_END_TIMESTAMP'})
{
$shared_file_time += $file_record{'CP_F_READ_END_TIMESTAMP'} -
$file_record{'CP_F_OPEN_TIMESTAMP'};
}
else
{
$shared_file_time += $file_record{'CP_F_WRITE_END_TIMESTAMP'} -
$file_record{'CP_F_OPEN_TIMESTAMP'};
}
}
}
# TODO
# (detect mpi or posix and):
......
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