Repository navigation
Merged
Conversation
… workers, pay down test debt (#606)
There was a problem hiding this comment.
Benchmark
Details
| Benchmark suite | Current: cf0caa8 | Previous: ffe365c | Ratio |
|---|---|---|---|
benchmarks/test_guard_by_type.py::test_g16_resolve_by_type |
3950185.9431616464 iter/sec (stddev: 7.745686381423656e-9) |
4650912.939324458 iter/sec (stddev: 1.706440348160392e-8) |
1.18 |
benchmarks/test_guard_by_type.py::test_g17_resolve_by_type_large_registry |
3959333.683742874 iter/sec (stddev: 6.0933195179902515e-9) |
4564403.042262547 iter/sec (stddev: 2.130887895421523e-8) |
1.15 |
benchmarks/test_guard_cold.py::test_g8_cold_first_resolve |
22511.995070418634 iter/sec (stddev: 0.00004111685903610907) |
18672.690009299124 iter/sec (stddev: 0.000040957900608557336) |
0.83 |
benchmarks/test_guard_cold.py::test_g8b_cold_first_resolve_cached |
17528.177338987985 iter/sec (stddev: 0.00014840046722346283) |
14435.165757881416 iter/sec (stddev: 0.00015649027293176276) |
0.82 |
benchmarks/test_guard_concurrency.py::test_g14_concurrent_cached_hit[1] |
512.1402568351706 iter/sec (stddev: 0.000057403048352041066) |
606.7458247729055 iter/sec (stddev: 0.00006403397442405826) |
1.18 |
benchmarks/test_guard_concurrency.py::test_g14_concurrent_cached_hit[2] |
499.36872452706854 iter/sec (stddev: 0.00008212224430016972) |
566.5625364040568 iter/sec (stddev: 0.00006131135700297531) |
1.13 |
benchmarks/test_guard_concurrency.py::test_g14_concurrent_cached_hit[4] |
477.667401533961 iter/sec (stddev: 0.00003973808132966421) |
512.1861640209803 iter/sec (stddev: 0.00005466146361602645) |
1.07 |
benchmarks/test_guard_concurrency.py::test_g15_concurrent_first_resolve[1] |
12361.0947728639 iter/sec (stddev: 0.000010075445713161572) |
1756.8118292460897 iter/sec (stddev: 0.0001580997113539773) |
0.14 |
benchmarks/test_guard_concurrency.py::test_g15_concurrent_first_resolve[2] |
7152.323327958439 iter/sec (stddev: 0.000018633341471109837) |
1424.340746556056 iter/sec (stddev: 0.00017645930230460275) |
0.20 |
benchmarks/test_guard_concurrency.py::test_g15_concurrent_first_resolve[4] |
3712.139770477795 iter/sec (stddev: 0.00003179413836037132) |
999.3575047320206 iter/sec (stddev: 0.00019075327136160947) |
0.27 |
benchmarks/test_guard_concurrency.py::test_g15b_concurrent_first_resolve_sibling_children[1] |
8715.81792393906 iter/sec (stddev: 0.000009341772940330055) |
1776.3768085999434 iter/sec (stddev: 0.00019073682152782808) |
0.20 |
benchmarks/test_guard_concurrency.py::test_g15b_concurrent_first_resolve_sibling_children[2] |
3609.1900445262654 iter/sec (stddev: 0.000020340743363126515) |
1244.4859807766236 iter/sec (stddev: 0.00018810472467390178) |
0.34 |
benchmarks/test_guard_concurrency.py::test_g15b_concurrent_first_resolve_sibling_children[4] |
1828.0617997614563 iter/sec (stddev: 0.000035023646802588695) |
723.4024060255196 iter/sec (stddev: 0.0014598867005660315) |
0.40 |
benchmarks/test_guard_concurrency.py::test_g15c_worker_pool_floor_control[1] |
40243.39203514915 iter/sec (stddev: 0.000003460489734697166) |
||
benchmarks/test_guard_concurrency.py::test_g15c_worker_pool_floor_control[2] |
15869.07379347525 iter/sec (stddev: 0.000013541609614824049) |
||
benchmarks/test_guard_concurrency.py::test_g15c_worker_pool_floor_control[4] |
6608.72321723006 iter/sec (stddev: 0.00002684098432508923) |
||
benchmarks/test_guard_lifecycle.py::test_g6_build_child_container |
1204208.6490166876 iter/sec (stddev: 4.1114870543639516e-8) |
1219360.5929127778 iter/sec (stddev: 4.021730185866024e-8) |
1.01 |
benchmarks/test_guard_lifecycle.py::test_g6b_build_child_container_auto_scope |
1088356.686696722 iter/sec (stddev: 2.1866267986318034e-8) |
1165899.4125525632 iter/sec (stddev: 2.7625866083506307e-8) |
1.07 |
benchmarks/test_guard_lifecycle.py::test_g7_request_lifecycle_batch |
2533.6686100802854 iter/sec (stddev: 0.00001139311912002462) |
2236.288706117797 iter/sec (stddev: 0.00001689205206591054) |
0.88 |
benchmarks/test_guard_lifecycle.py::test_g7c_event_loop_floor_control |
57115.703312321224 iter/sec (stddev: 0.0000016443527337652109) |
67638.75445199345 iter/sec (stddev: 0.000001407229405623694) |
1.18 |
benchmarks/test_guard_lifecycle.py::test_g7b_request_cycle_sync |
310800.7165076886 iter/sec (stddev: 1.631130904295121e-7) |
300382.96424878866 iter/sec (stddev: 9.599708707416182e-8) |
0.97 |
benchmarks/test_guard_lifecycle.py::test_g13_teardown_at_scale |
40906.247841908604 iter/sec (stddev: 0.0000017852769299060014) |
41864.52786889268 iter/sec (stddev: 0.0000019744511004598563) |
1.02 |
benchmarks/test_guard_lifecycle.py::test_g13b_teardown_at_scale_async_no_finalizers |
459.329246138679 iter/sec (stddev: 0.001540877709414442) |
469.4101679223813 iter/sec (stddev: 0.0010765366169991888) |
1.02 |
benchmarks/test_guard_resolve.py::test_g1_transient_resolve |
2370395.373655168 iter/sec (stddev: 2.719325034407428e-8) |
2643693.8483676505 iter/sec (stddev: 3.622929811410649e-8) |
1.12 |
benchmarks/test_guard_resolve.py::test_g2_cached_resolve |
3826361.6959387376 iter/sec (stddev: 6.881111680281884e-9) |
4533963.42125545 iter/sec (stddev: 1.7932439514885506e-8) |
1.18 |
benchmarks/test_guard_resolve.py::test_g3_deep_chain |
804851.499967102 iter/sec (stddev: 6.221465859700483e-8) |
874097.5270822884 iter/sec (stddev: 1.3204596479966074e-7) |
1.09 |
benchmarks/test_guard_resolve.py::test_g4_wide_resolve |
474597.19690068497 iter/sec (stddev: 4.500930080375432e-7) |
473981.3057505384 iter/sec (stddev: 6.531655111675316e-7) |
1.00 |
benchmarks/test_guard_resolve.py::test_g5_cross_scope |
2117031.0650465 iter/sec (stddev: 2.421736471148955e-8) |
2097795.777795691 iter/sec (stddev: 1.4347586989334604e-7) |
0.99 |
benchmarks/test_guard_resolve.py::test_g9_context_resolve |
1599748.4555455411 iter/sec (stddev: 1.7486836072420347e-7) |
1717618.5322124795 iter/sec (stddev: 1.6797887345620352e-7) |
1.07 |
benchmarks/test_guard_resolve.py::test_g12_override_active_resolve |
814359.9013097215 iter/sec (stddev: 3.83673928040184e-8) |
912090.6924636723 iter/sec (stddev: 1.0201256745872507e-7) |
1.12 |
benchmarks/test_guard_resolve.py::test_g18_alias_hop |
3555794.3785150237 iter/sec (stddev: 9.776863197907824e-9) |
4347042.296334007 iter/sec (stddev: 2.597541863228709e-8) |
1.22 |
benchmarks/test_guard_validate.py::test_g10_validate_deep_chain |
29421.917286472395 iter/sec (stddev: 0.00002187082673368506) |
20347.922617500906 iter/sec (stddev: 0.00024790180939011935) |
0.69 |
benchmarks/test_guard_validate.py::test_g11_validate_wide |
17064.86456847256 iter/sec (stddev: 0.000027105569824449245) |
13773.313381664582 iter/sec (stddev: 0.000027510882864299994) |
0.81 |
This comment was automatically generated by workflow using github-action-benchmark.
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #606.
Summary
Baseline on ffe365c: 963 tests, 100% line coverage, 99.90% branch coverage of
modern_di(two partial branches). After: 965 tests, 100% line and 100% branch coverage, and CI now enforces both.just test-cimeasuresmodern_dionly (run.source) withrun.branch = true. The two partial branches are closed:collect_errorsgetscase _: typing.assert_never(event)(excluded from the report viaexclude_also;tyfails if anEventmember loses its case), and a new test cancelsclose_asyncafter an earlier item finalized, then closes again, which reachesCacheItem.close_asyncwith nothing owed. Thetest-branchrecipe is gone becausetest-cinow does what it did.tests/test_bench_report.pyonly parses the comparative tier and still passes.Barrierandjoinintest_free_threading.pyand the two race tests inregistries/test_providers_registry.pyhas a timeout, joins are followed by anis_aliveassertion, and the threads are daemons so a hang fails the test instead of the run. A newthread_racemarker covers that module plus the three race tests named in the issue; the 3.14t step runsjust test -m thread_race --count=50without the redundant-W error::RuntimeWarning._providers_registry.add_providers/register(...)calls in tests now usecontainer.add_providers(...); every registered type matched the provider'sbound_type, so they are equivalent. The blankettests/**SLF001 ignore is narrowed to the 13 files that still read internals with no public equivalent.modern_dimeasured, all 54# pragma: no covercomments and the 12 "exercise the body for coverage" asserts in tests are removed.run.concurrency,run.omitandaddopts = ""are dropped.simplefilter("error")blocks; the partial-creator test now asserts the warning on 3.11-3.13 and its absence on 3.14+; theinspect.signaturepatch test asserts the patched call happened.ISC001ignore.release.ymlusesastral-sh/setup-uv@v8.2.0like the other workflows. New allowed-to-fail matrix entries for 3.15 and 3.15t (continue-on-error), and the free-threaded steps now key on a trailingt.uvfetchescpython-3.15.0rc1; both builds pass the full gated suite locally after adding arepr(UNSET)test, which was only covered incidentally before 3.15.linksjob checks local links in every Markdown file.Design decisions
modern_diinstead of.(the issue'sexclude_alsoalternative) because branch coverage over tests reports 139 partial branches that are coverage.py artefacts ofclass X: ...bodies, and the pragmas existed only to satisfy line coverage of test code. The cost: a test helper that never runs is no longer reported._cache_registry.cached_count()asserts are untouched; the registry refactor in Refactor and perf: registry hooks, container-owned cache and context, cheaper child build #605 replaces them.Open questions
Test plan
just lint,just lint-cijust test-ci(965 passed, 100% line and branch)just test -m thread_race --count=50on 3.14t and 3.15ttests/test_bench_report.pymkdocs build --strict,just adr-check