Skip to content

ci(timing): run the unit legs at -n logical and read latest's JUnit timings (#2571) - #2572

Merged
JarryShaw merged 2 commits into
mainfrom
ci/2571-xdist-logical
Nov 1, 2026
Merged

JarryShaw merged 2 commits into
mainfrom
ci/2571-xdist-logical

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • fix — corrects a defect
  • feat — adds a feature
  • perf — changes performance, not behaviour
  • refactor — changes neither behaviour nor performance
  • test — tests only
  • docs — documentation only
  • ci — workflows or build tooling
  • release — bumps the version or rolls up a distribution
  • chore — anything else
  • const — regenerates constant or registry tables, members keeping their numeric values

Description of your pull request and other information

Closes #2571 (hard finding H1 of ci-timing run 41303273918; H2 is that week's window spanning #2258's split).

  • Run unit tests uses -n logical instead of -n auto. With psutil in the test extra, auto counts physical cores, so the 4-CPU runner ran 2 workers. The CPython legs, KTLO included, now run 4. PyPy, which has no psutil, is unchanged.
  • util/ci_timing.py: JUNIT_LEGS adds the latest version, derived from python-versions.toml, so the report names the coverage leg's slowest modules.
  • The test job's matrix comment drops its measured figures and says why the coverage leg is slower. test-coverage.rst and process.rst follow.
  • Tests pin -n logical on every unit leg and the latest version in JUNIT_LEGS. Both fail on main.
  • This PR's own Python 3.15 run gives the before and after. The weekly report after merge re-baselines.

…imings (#2571)

- unit-tests.yml `Run unit tests`: `-n logical`, not `auto`, which counts
  physical cores once psutil is installed (the `test` extra, CPython),
  half the runner's CPUs. PyPy has no psutil; there the two agree.
  `test-ktlo` shares the step by alias.
- The `test` matrix comment drops its stale figures and says why the
  coverage leg is slower: the `LATEST` tier too, under coverage.
- util/ci_timing.py: JUNIT_LEGS adds `latest`, read from the tier file
  with COVERAGE_JOB, so the report names the coverage leg's modules.
- test-coverage.rst names the new flag; process.rst's monthly-refresh
  bullet no longer lists the dropped headroom figure.
- Tests: a per-leg `-n logical` pin, a JUNIT_LEGS-has-latest check, and
  the Windows leg's flags pin re-pinned to each side's `-n` value.
@JarryShaw JarryShaw added ci Pull requests that change CI or workflow configuration (ci: subject prefix) review: running A cross-review is in flight against the current head - no verdict yet labels Nov 1, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 1, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Cross-review (Sonnet) at 5dd520c06: GOOD TO GO.

  • xdist: in pytest-xdist 3.8.0, -n auto calls psutil.cpu_count(logical=False). Run 41283973389's 3.15 log shows cpu_count 4 with 2 xdist workers. Without psutil, both settings resolve the same way, so PyPy is unaffected.
  • KTLO legs: they move to 4 workers too. They are non-blocking, and they ran 4 before psutil joined the test extra.
  • JUNIT_LEGS: the latest version adds about 5 API calls, well inside the budget.
  • Pins: the re-pinned Windows-leg test fails on every one of seven flag mutations. The new tests fail on main.
  • Accuracy nits are being folded into one commit: a timed phrase in a test docstring, W3's location, test-coverage.rst's -n logical scope, the LATEST name clash, and a stale module docstring.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Coverage: 93.94% (unit tier, Python 3.15, fba120819, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 20087 144 2710 125 98.78%
pcapkit/corekit 2605 74 818 37 96.52%
pcapkit/dumpkit 281 3 100 3 98.43%
pcapkit/foundation 3194 27 1112 31 98.65%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 19906 213 5236 207 98.32%
pcapkit/toolkit 924 36 334 10 95.55%
pcapkit/utilities 502 7 144 5 98.14%
pcapkit/vendor 5009 2222 1148 182 52.31%

Per-file detail: the coverage-html artifact of this run.

- test_windows_test_leg_2060.py: the flags docstrings state what is true
  now, all but `-n`, which only `test`'s step sets to `logical`.
- unit-tests.yml: W3 is util/ci_timing.py's, not ci-timing.yml's; the
  `-n logical` comment is two lines.
- test-coverage.rst: `-n logical` is the `test` job's, the unit tier's.
- util/ci_timing.py: LATEST_VERSION, so it is not mistaken for the
  `LATEST` tier; JUNIT_LEGS drops a duplicate leg, which the test pins.
@JarryShaw

Copy link
Copy Markdown
Owner Author

Pushed fba120819 with the review's accuracy fixes:

  • W3 is named in util/ci_timing.py.
  • test-coverage.rst scopes -n logical to the unit tier.
  • LATEST is now LATEST_VERSION, and JUNIT_LEGS is deduplicated with a test.
  • The docstrings and comment state only what holds now.

The verdict stands.

Measured on this PR's CI at 5dd520c06: Run unit tests took 13.0 min on Python 3.15, down from the 21.4-min median since psutil joined the test extra. The job took 14.1 min, 31% of its 45-minute cap. 3.13 took 4.3 min (median 11.2) and 3.14 took 5.1.

@JarryShaw
JarryShaw merged commit d5d3f3b into main Nov 1, 2026
61 checks passed
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 1, 2026
@JarryShaw
JarryShaw deleted the ci/2571-xdist-logical branch November 1, 2026 15:41
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 1, 2026
JarryShaw added a commit that referenced this pull request Nov 1, 2026
- Added: one's-complement checksum verification and computation (#2543),
  and the IPX and SCTP registration wrappers (#2521).
- Folded into unreleased entries: LinuxSLL/FRAD/Netlink registries (#2527),
  the IGMP class names (#2542), TLS record chaining and the SSLv2 trial's
  warnings (#2537), DTLS reassembly via Extractor and toolkit (#2528), and
  IP_Pseudo's walk at any depth (#2543). ICMP drops its stale checksum line.
- Breaking: make() checksums, DRARP's module (#2540), IPv6 overlapping
  fragments (#2569), TCP_GAP_LIMIT replacing TCP.__window__ (#2579), and
  Extractor/extract's positional dtls (#2528).
- Changed: member order (#2490), conventions (#2542, #2521, #2570), CI -n
  logical (#2572). Fixed: AppType.get (#2568), trial warnings (#2519, #2577).
- CHANGELOG.md regenerated; util/changelog_md.py --check passes.
@github-actions github-actions Bot added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pull requests that change CI or workflow configuration (ci: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ci(timing): the Python 3.15 leg's p90 passes half its 45-minute cap, and the unsplit project ordering name fires the step check

1 participant