gpperfmon: refactor to make 'skew' calculation more readable
Coefficient of Variation Calculation
Coefficient of variation is the standard deviation divided by the mean.
We're using the term skew very loosely in our description, as we're
actually calculating coefficient of variation.
With coefficient of variation, we can tell how dispersed the data points are across
the segments. The higher the coefficient of variation, the more
non-uniform the distribution of the data in cluster.
Coefficient of variation is unitless so it could be used for comparing
different clusters and how they are performing relative to each other.
CPU Skew calculation:
mean(cpu) = sum(per segment cpu cycle) / sum(segments)
variance(cpu) = sqrt( sum(((cpu(segment) - mean(cpu))^2) ... ) / sum(segments) )
std_dev(cpu) = sqrt(variance(cpu))
skew(cpu) = coeffecient of variation = std_dev(cpu)/mean(cpu)
Row out Skew calculation:
mean(row) = sum(per segment row) / sum(segments)
variance(row) = sqrt( sum(((row(segment) - mean(row))^2) ... ) / sum(segments) )
std_dev(row) = sqrt(variance(row))
skew(row) = coeffecient of variation = std_dev(row)/mean(row)
Signed-off-by: NTushar Dadlani <tdadlani@pivotal.io>
Showing
想要评论请 注册 或 登录