Skip to content

Commit

Permalink
Avoid inf average values in SimpleMemoryCheck
Browse files Browse the repository at this point in the history
  • Loading branch information
iarspider committed Jan 28, 2025
1 parent 1573d0a commit 6d1fe4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FWCore/Services/plugins/SimpleMemoryCheck.cc
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ namespace edm {
}

double SimpleMemoryCheck::averageGrowthRate(double current, double past, int count) {
return (current - past) / (double)count;
return (current - past) / (double)std::max(count, 1);
}

SimpleMemoryCheck::SimpleMemoryCheck(ParameterSet const& iPS, ActivityRegistry& iReg)
Expand Down

0 comments on commit 6d1fe4c

Please sign in to comment.