• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aio-libs / multidict / 38270578205
86%

Build:
DEFAULT BRANCH: master
Ran 12 Oct 2026 03:30PM UTC
Jobs 1
Files 50
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Oct 2026 03:29PM UTC coverage: 85.863% (-0.01%) from 85.873%
38270578205

push

github

web-flow
Measure clear() alone over a thousand prebuilt multidicts (#1784)

<!-- Thank you for your contribution! -->

## What do these changes do?

`test_multidict_clear_str` and `test_watched_clear_str` copied a
100-item multidict inside the timed loop and cleared it, 100 times. The
measurement was mostly `copy()`, and it depended on where malloc put one
small table. Over the last 50 master runs on CodSpeed, `clear_str[cs-c]`
moved between 494 and 587 µs and `clear_str[ci-c]` between 786 and 905
µs, with the same commit landing anywhere in that range (c728ce1c read
882, 848 and 824 µs for `ci-c`). The instruction cost stayed within
0.4%; the swing came from the simulated memory access cost (up to 137%).
`popitem_str[cs-c]`, which does the same copy over far more work, stayed
within 0.4%.

Both benchmarks now use `benchmark.pedantic(setup=...)`: the setup
builds 1000 copies of multidicts with 0 to 99 items (and watches them,
for the watched variant) outside the measured region, and only the
`clear()` calls are timed. Spreading the work over many tables of every
size up to 128 slots, including the empty fast path, averages out the
layout effect.

## Are there changes in behavior for the user?

No, benchmarks only. The two benchmarks keep their names, so their
CodSpeed history shows one step at this commit.

## Is it a substantial burden for the maintainers to support this?

No.

## Related issue number

None.

## Checklist

- [x] I think the code is well written
- [ ] Unit tests for the changes exist (N/A, benchmark change)
- [ ] Documentation reflects the changes (N/A)
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt` (N/A)
- [x] Add a new news fragment into the `CHANGES/` folder
- [x] `make doc-spelling` passes and any new technical words are added
to `docs/spelling_wordlist.txt`

<details>
<summary>Agent run details (optional, for reviewers)</summary>

Python 3.11.13, C extension: `pytest -m 'expensive or capi or not
hypothes... (continued)

842 of 1684 branches covered (50.0%)

Branch coverage included in aggregate %.

13 of 15 new or added lines in 2 files covered. (86.67%)

9799 of 10709 relevant lines covered (91.5%)

1.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
99.23
-0.15% tests/test_multidict_benchmarks.py
1
94.12
-0.62% tests/test_watched_benchmarks.py
Jobs
ID Job ID Ran Files Coverage
1 MyPy - 38270578205.1 12 Oct 2026 03:30PM UTC 100
85.86
GitHub Action Run
Source Files on build 38270578205
  • Tree
  • List 50
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #38270578205
  • 9de78522 on github
  • Prev Build on master (#38260903097)
  • Next Build on master (#38274499752)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc