Skip to content

Commit ae81816

Browse files
authored
Update analyze_cache_effectiveness.py
1 parent cb8fd8a commit ae81816

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

turbopack/scripts/analyze_cache_effectiveness.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def avg_execution_time_ns(self) -> int:
4747
MEASUREMENT_OVERHEAD = 750 # OVerhead implicit in the reported duration
4848
if self.executions == 0:
4949
return 0
50-
return (self.duration_ns - MEASUREMENT_OVERHEAD * self.executions) // self.executions
50+
return max(0, (self.duration_ns - MEASUREMENT_OVERHEAD * self.executions) // self.executions)
5151

5252

5353
def parse_duration(duration_dict: Dict) -> int:

0 commit comments

Comments
 (0)