提交 b09b727e 编写于 作者: X Xu Tian 提交者: GitHub

Merge pull request #675 from PandaWei/percent

Trivial fix for the usage of percentage
......@@ -762,13 +762,13 @@ def run(test, params, env):
except ZeroDivisionError:
logging.error("ZeroDivisionError in stats calculation")
stats[i] = False
limit = 1 - float(params.get("cgroup_limit", 0.05))
for i in range(1, len(stats)):
# Utilisation should be 100% - allowed treshold (limit)
if stats[i] < limit:
logging.debug("%d: guest time is not >%s%% %s" % (i, limit,
stats[i]))
logging.debug("%d: the utilisation of guest time is %s, "
"smaller than limit %s" % (i, stats[i], limit))
err.append(i)
finally:
......
......@@ -213,5 +213,5 @@ def run(test, params, env):
if real_speed > mig_speed + ack_speed:
divergence = (1 - float(mig_speed) / float(real_speed)) * 100
raise error.TestWarn("Average migration speed (%s MB/s) "
"is %3.1f %% higher than target (%s MB/s)" %
"is %3.1f%% higher than target (%s MB/s)" %
(real_speed, divergence, mig_speed))
......@@ -126,7 +126,7 @@ def run(test, params, env):
if real_speed > mig_speed + ack_speed:
divergence = (1 - float(mig_speed) / float(real_speed)) * 100
raise error.TestWarn("Average migration speed (%s MB/s) "
"is %3.1f %% higher than target (%s MB/s)" %
"is %3.1f%% higher than target (%s MB/s)" %
(real_speed, divergence, mig_speed))
finally:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册