Skip to content

Commit 9a536a2

Browse files
authored
fix: perf tests for Logger and fail str msgs
1 parent 28afbe4 commit 9a536a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/performance/test_high_level_imports.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import pytest
88

9-
LOGGER_INIT_SLA: float = 0.001
9+
LOGGER_INIT_SLA: float = 0.005
1010
METRICS_INIT_SLA: float = 0.005
1111
TRACER_INIT_SLA: float = 0.5
1212
IMPORT_INIT_SLA: float = 0.035
@@ -48,7 +48,7 @@ def test_import_times_ceiling():
4848

4949
elapsed = t()
5050
if elapsed > IMPORT_INIT_SLA:
51-
pytest.fail(f"High level imports should be below 35ms: {elapsed}")
51+
pytest.fail(f"High level imports should be below ${IMPORT_INIT_SLA}s: {elapsed}")
5252

5353

5454
@pytest.mark.perf
@@ -64,7 +64,7 @@ def test_tracer_init():
6464

6565
elapsed = t()
6666
if elapsed > TRACER_INIT_SLA:
67-
pytest.fail(f"High level imports should be below 50ms: {elapsed}")
67+
pytest.fail(f"High level imports should be below ${TRACER_INIT_SLA}s: {elapsed}")
6868

6969

7070
@pytest.mark.perf
@@ -78,7 +78,7 @@ def test_metrics_init():
7878

7979
elapsed = t()
8080
if elapsed > METRICS_INIT_SLA:
81-
pytest.fail(f"High level imports should be below 40ms: {elapsed}")
81+
pytest.fail(f"High level imports should be below ${METRICS_INIT_SLA}s: {elapsed}")
8282

8383

8484
@pytest.mark.perf
@@ -92,4 +92,4 @@ def test_logger_init():
9292

9393
elapsed = t()
9494
if elapsed > LOGGER_INIT_SLA:
95-
pytest.fail(f"High level imports should be below 40ms: {elapsed}")
95+
pytest.fail(f"High level imports should be below ${LOGGER_INIT_SLA}s: {elapsed}")

0 commit comments

Comments
 (0)