Skip to content

Commit

Permalink
LPS-108285 SF
Browse files Browse the repository at this point in the history
  • Loading branch information
shuyangzhou authored and brianchandotcom committed Feb 25, 2020
1 parent 7630efd commit fd919f0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ public class ServerSummaryStatistics implements SummaryStatistics {

@Override
public long getAverageTime() {
long averageTime = 0;

Set<CompanyStatistics> companyStatisticsSet =
_serverStatistics.getCompanyStatisticsSet();

if (companyStatisticsSet.isEmpty()) {
return 0;
}

long averageTime = 0;

for (CompanyStatistics companyStatistics : companyStatisticsSet) {
RequestStatistics requestStatistics =
companyStatistics.getRequestStatistics();

averageTime += requestStatistics.getAverageTime();
}

if (!companyStatisticsSet.isEmpty()) {
return averageTime / companyStatisticsSet.size();
}

return averageTime;
return averageTime / companyStatisticsSet.size();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public long getAverageTime() {
return averageTime / count;
}

return averageTime;
return 0;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public long getAverageTime() {
return averageTime / count;
}

return averageTime;
return 0;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public long getAverageTime() {
return averageTime / count;
}

return averageTime;
return 0;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public long getAverageTime() {
return averageTime / count;
}

return averageTime;
return 0;
}

@Override
Expand Down

0 comments on commit fd919f0

Please sign in to comment.