fdalsotto commented on a change in pull request #4900:
URL: https://github.com/apache/cloudstack/pull/4900#discussion_r611460511



##########
File path: 
plugins/metrics/src/main/java/org/apache/cloudstack/response/HostMetricsResponse.java
##########
@@ -165,25 +165,25 @@ public void setNetworkWrite(final Long networkWriteKbs) {
 
     public void setCpuUsageThreshold(final String cpuUsed, final Double 
threshold) {
         if (cpuUsed != null && threshold != null) {
-            this.cpuThresholdExceeded = Double.valueOf(cpuUsed.replace("%", 
"")) > (100.0 * threshold);
+            this.cpuThresholdExceeded = 
Double.valueOf(cpuUsed.replace(",",".").replace("%", "")) > (100.0 * threshold);

Review comment:
       any chance of building a function to replace these characters? might be 
easier to maintain this code later




-- 
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.

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


Reply via email to