Spaces:
Running
Running
Jeremiah Lowin commited on
Increase performance test threshold to 100ms (#1406)
Browse files
tests/experimental/server/openapi/test_performance_comparison.py
CHANGED
|
@@ -197,14 +197,14 @@ class TestPerformanceComparison:
|
|
| 197 |
|
| 198 |
# Both implementations should be very fast for moderate specs
|
| 199 |
# The key achievement is eliminating the 100-200ms latency issue for serverless
|
| 200 |
-
max_acceptable_time = 0.
|
| 201 |
|
| 202 |
print(f"Legacy performance: {'✓' if legacy_avg < max_acceptable_time else '✗'}")
|
| 203 |
print(f"New performance: {'✓' if new_avg < max_acceptable_time else '✗'}")
|
| 204 |
|
| 205 |
-
# New implementation should be under
|
| 206 |
assert new_avg < max_acceptable_time, (
|
| 207 |
-
f"New implementation should initialize in under
|
| 208 |
)
|
| 209 |
|
| 210 |
# Legacy might be slightly faster or slower on small specs, but both should be fast
|
|
|
|
| 197 |
|
| 198 |
# Both implementations should be very fast for moderate specs
|
| 199 |
# The key achievement is eliminating the 100-200ms latency issue for serverless
|
| 200 |
+
max_acceptable_time = 0.1 # 100ms
|
| 201 |
|
| 202 |
print(f"Legacy performance: {'✓' if legacy_avg < max_acceptable_time else '✗'}")
|
| 203 |
print(f"New performance: {'✓' if new_avg < max_acceptable_time else '✗'}")
|
| 204 |
|
| 205 |
+
# New implementation should be under 100ms for reasonable specs (serverless requirement)
|
| 206 |
assert new_avg < max_acceptable_time, (
|
| 207 |
+
f"New implementation should initialize in under 100ms, got {new_avg:.4f}s"
|
| 208 |
)
|
| 209 |
|
| 210 |
# Legacy might be slightly faster or slower on small specs, but both should be fast
|