We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 008d47e commit f8ff1d8Copy full SHA for f8ff1d8
adaptive/runner.py
@@ -180,6 +180,10 @@ def overhead(self):
180
but is a rough rule of thumb.
181
"""
182
t_function = self._elapsed_function_time
183
+ if t_function == 0:
184
+ # When no function is done executing, the overhead cannot
185
+ # reliably be determined, so 0 is the best we can do.
186
+ return 0
187
t_total = self.elapsed_time()
188
return (1 - t_function / t_total) * 100
189
@@ -426,7 +430,6 @@ class AsyncRunner(BaseRunner):
426
430
overhead of the executor. Essentially, this is
427
431
``100 * (1 - total_elapsed_function_time / self.elapsed_time())``.
428
432
429
-
433
Notes
434
-----
435
This runner can be used when an async function (defined with
0 commit comments