mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
address greptile review feedback (greploop iteration 3)
- fix falsy-zero bug in _compute_overhead_pct: use 'is not None' instead of truthiness check so 0.0 overhead is reported correctly
This commit is contained in:
parent
6e9f245bbb
commit
5c9f3febd2
1 changed files with 1 additions and 1 deletions
|
|
@ -326,6 +326,6 @@ def _compute_overhead_pct(latency_stats: dict) -> Optional[float]:
|
|||
return None
|
||||
avg_overhead = overhead.get("avg_ms")
|
||||
avg_total = total.get("avg_ms")
|
||||
if avg_overhead and avg_total and avg_total > 0:
|
||||
if avg_overhead is not None and avg_total is not None and avg_total > 0:
|
||||
return round((avg_overhead / avg_total) * 100, 1)
|
||||
return None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue