Normalizes the metric to log scale score
(metric: int, base=10)
| 567 | |
| 568 | |
| 569 | def log_scale(metric: int, base=10) -> int: |
| 570 | """ |
| 571 | Normalizes the metric to log scale score |
| 572 | """ |
| 573 | if metric > 0: |
| 574 | return math.ceil(math.log(metric, base)) |
| 575 | else: |
| 576 | return 0 |
no outgoing calls
no test coverage detected