Fix AdminInfo#getExecAverage divide by zero

AdminInfo#getExecAverage throws divide by zero exception when
blockExecTime#size is 0 [Delivers #88031650]
This commit is contained in:
Roman Mandeleil 2015-02-10 16:07:55 +02:00
parent ad2eefb789
commit 32ff7a7b68
1 changed files with 2 additions and 0 deletions

View File

@ -43,6 +43,8 @@ public class AdminInfo {
public Long getExecAvg(){
if (blockExecTime.size() == 0) return 0L;
long sum = 0;
for (int i = 0; i < blockExecTime.size(); ++i){
sum += blockExecTime.get(i);