diff --git a/tests/benchmark/test_filter_missing.py b/tests/benchmark/test_filter_missing.py index 160b54410..78099d40b 100644 --- a/tests/benchmark/test_filter_missing.py +++ b/tests/benchmark/test_filter_missing.py @@ -9,10 +9,13 @@ @pytest.mark.parametrize( ("width", "depth"), ( - # note that the expected number of objects is roughly "WIDTH raised to DEPTH" - # so relatively modest numbers like 5x10 = 5 to the 10th = 9.7 million - # be careful to build wide-but-shallow or deep-but-narrow trees - pytest.param(1, 1, id="1w-1d"), + # Note that the expected number of objects is roughly "WIDTH raised to DEPTH" + # so relatively modest numbers like 5x10 = 5 to the 10th = 9.7 million. + # Be careful to build wide-but-shallow or deep-but-narrow trees. + # + # Experientially, the 1x1 benchmark is so fast that it actually starts to + # measure noise -- e.g., from memory layout in CPython being perturbed. + # Therefore it is omitted and we start at the modest 1x5 and 5x1 shapes. pytest.param(5, 1, id="5w-1d"), pytest.param(1, 5, id="1w-5d"), pytest.param(1, 1000, id="1w-1000d"), diff --git a/tests/benchmark/test_scope_parser.py b/tests/benchmark/test_scope_parser.py index fdcc18f63..c3cd62053 100644 --- a/tests/benchmark/test_scope_parser.py +++ b/tests/benchmark/test_scope_parser.py @@ -1,6 +1,6 @@ import pytest -from globus_sdk.scopes import ScopeParser +from globus_sdk.scopes import ScopeParser, TransferScopes def _make_deep_scope(depth): @@ -20,6 +20,11 @@ def _make_wide_scope(width): return big_scope +def test_ordinary_scope_parsing(benchmark): + scope_string = f"openid profile {TransferScopes.all}" + benchmark(ScopeParser.parse, scope_string) + + @pytest.mark.parametrize("depth", (10, 100, 1000, 2000, 3000, 4000, 5000)) def test_deep_scope_parsing(benchmark, depth): scope_string = _make_deep_scope(depth)