Ver código fonte

[stress] Fixes seconds display for subsecond results

Ask Solem 9 anos atrás
pai
commit
60e4bfcfe4
1 arquivos alterados com 4 adições e 2 exclusões
  1. 4 2
      funtests/stress/stress/suite.py

+ 4 - 2
funtests/stress/stress/suite.py

@@ -60,10 +60,12 @@ class StopSuite(Exception):
 
 
 def pstatus(p):
+    runtime = monotonic() - p.runtime
+    elapsed = monotonic() - p.elapsed
     return F_PROGRESS.format(
         p,
-        runtime=humanize_seconds(monotonic() - p.runtime, now='0 seconds'),
-        elapsed=humanize_seconds(monotonic() - p.elapsed, now='0 seconds'),
+        runtime=humanize_seconds(runtime, now=runtime),
+        elapsed=humanize_seconds(elapsed, now=elapsed),
     )