Commit 9b723973 authored by Kevin Harms's avatar Kevin Harms

Handle cases where count can be zero. (Need to check if fsstats should

generate entries for zero count data)

Allow for case where max bucket value can be -1.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@165 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 03a2ec99
......@@ -262,10 +262,13 @@ sub add_histogram
elsif($line =~ /^max,(.*),/) {$max = $1;}
elsif($line =~ /^bucket min,bucket max,/) {} # key
elsif($line =~
/^([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*)/)
/^([0-9]*\.?[0-9]*),([0-9]*\.?\-?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*),([0-9]*\.?[0-9]*)/)
{
$_[1]->add(($6/$3), $3);
$total_count += $3;
if ($3 > 0)
{
$_[1]->add(($6/$3), $3);
$total_count += $3;
}
}
elsif($line =~ /^\s*$/)
{
......
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