Github user revans2 commented on a diff in the pull request:
https://github.com/apache/storm/pull/2827#discussion_r217094208
--- Diff:
storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java ---
@@ -582,11 +582,9 @@ public static Response makeStandardResponse(
result.put("schedulerDisplayResource",
conf.get(DaemonConfig.SCHEDULER_DISPLAY_RESOURCE));
result.put("memAssignedPercentUtil", supervisorTotalMemory > 0
- ? String.valueOf((supervisorTotalMemory -
supervisorUsedMemory) * 100.0
- / supervisorTotalMemory) : "0.0");
+ ? String.valueOf((supervisorUsedMemory * 100.0) /
supervisorTotalMemory) : "0.0");
result.put("cpuAssignedPercentUtil", supervisorTotalCpu > 0
- ? String.valueOf((supervisorTotalCpu - supervisorUsedCpu)
* 100.0
- / supervisorTotalCpu) : "0.0");
+ ? String.valueOf((supervisorUsedCpu * 100.0) /
supervisorTotalCpu) : "0.0");
--- End diff --
nit: Can we fix the rounding while we are at it?
---