diff --git a/source/plugins/ruby/MdmMetricsGenerator.rb b/source/plugins/ruby/MdmMetricsGenerator.rb index 0858990da0..f4904697cd 100644 --- a/source/plugins/ruby/MdmMetricsGenerator.rb +++ b/source/plugins/ruby/MdmMetricsGenerator.rb @@ -79,7 +79,7 @@ def populatePodReadyPercentageHash @pod_ready_hash.each { |dim_key, value| podsNotReady = @pod_not_ready_hash.key?(dim_key) ? @pod_not_ready_hash[dim_key] : 0 totalPods = value + podsNotReady - podsReadyPercentage = (value / totalPods) * 100 + podsReadyPercentage = value * 100.0 / totalPods @pod_ready_percentage_hash[dim_key] = podsReadyPercentage # Deleting this key value pair from not ready hash, # so that we can get those dimensions for which there are 100% of the pods in not ready state