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 bbec975 commit 0015410Copy full SHA for 0015410
adaptive/notebook_integration.py
@@ -250,10 +250,14 @@ def _info_html(runner):
250
"finished": "green",
251
}[status]
252
253
+ overhead = runner.overhead()
254
+ red_level = max(0, min(int(255 * overhead / 100), 255))
255
+ overhead_color = "#{:02x}{:02x}{:02x}".format(red_level, 255 - red_level, 0)
256
+
257
info = [
258
("status", f'<font color="{color}">{status}</font>'),
259
("elapsed time", datetime.timedelta(seconds=runner.elapsed_time())),
- ("overhead", f"{runner.overhead():.2f}%"),
260
+ ("overhead", f'<font color="{overhead_color}">{overhead:.2f}%</font>'),
261
]
262
263
with suppress(Exception):
0 commit comments