(duration: float)
| 333 | |
| 334 | |
| 335 | def format_duration(duration: float) -> tuple[str, str]: |
| 336 | pretty_duration = human.pretty_duration(duration) |
| 337 | style = "gradient_%02d" % int( |
| 338 | 99 - 100 * min(math.log2(max(1.0, 1000 * duration)) / 12, 0.99) |
| 339 | ) |
| 340 | return pretty_duration, style |
| 341 | |
| 342 | |
| 343 | def format_size(num_bytes: int) -> tuple[str, str]: |
no outgoing calls
searching dependent graphs…