DaanHoogland commented on code in PR #10492:
URL: https://github.com/apache/cloudstack/pull/10492#discussion_r1979097300


##########
server/src/main/java/com/cloud/server/StatsCollector.java:
##########
@@ -718,7 +718,7 @@ protected void runInContext() {
                  getDynamicDataFromDB();
                  long interval = (Long) dbStats.get(uptime) - lastUptime;
                  long activity = (Long) dbStats.get(queries) - lastQueries;
-                 loadHistory.add(0, Double.valueOf(activity / interval));
+                 loadHistory.add(0, interval == 0 ? 0 : 
Double.valueOf(activity / interval));

Review Comment:
   @lucas-a-martins (cc @Pearl1594 @rohityadavcloud ) please reconsider.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to