Skip to content

[wip] Optimize test durations - #8634

Draft
Jens Hedegaard Nielsen (jenshnielsen) wants to merge 5 commits into
microsoft:mainfrom
jenshnielsen:qcodes_faster_tests
Draft

Jens Hedegaard Nielsen (jenshnielsen) wants to merge 5 commits into
microsoft:mainfrom
jenshnielsen:qcodes_faster_tests

Conversation

@jenshnielsen

Copy link
Copy Markdown
Collaborator

No description provided.

@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.12195% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.64%. Comparing base (ca6f357) to head (e1333b2).

Files with missing lines Patch % Lines
src/qcodes/dataset/sqlite/database.py 93.61% 3 Missing ⚠️
src/qcodes/dataset/_results_backend.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8634      +/-   ##
==========================================
+ Coverage   72.62%   72.64%   +0.02%     
==========================================
  Files         307      307              
  Lines       32431    32481      +50     
==========================================
+ Hits        23552    23595      +43     
- Misses       8879     8886       +7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jenshnielsen Jens Hedegaard Nielsen (jenshnielsen) changed the title Qcodes faster tests [wip] Optimize test durations Oct 19, 2026
Distribute tests with worksteal rather than loadfile so that a single
slow file no longer determines the wall time of the run.

Use simulated Keysight B220x/B1500 instruments directly instead of
first probing a placeholder VISA address, simulate faster heating in
the Lakeshore mocks, poll subscriber state more often and drop sleeps
that are not needed.
Parsing the npy header of every stored value dominated the time it
takes to load array and complex data. Cache the parsed header, since
all rows of a parameter share it, and fall back to numpy's read_array
for anything the fast path does not handle.
The interdependencies of a dataset can not change once it has been
started, so freeze them at that point and when loading a started run
rather than only during a measurement. Reads now use the dataset's own
frozen description instead of parsing it from the database every call.

Unfreezing at the end of a measurement was only needed because frozen
and non frozen interdependencies never compared equal. Make equality
symmetric and let remove on a frozen instance return a new object like
extend does.
The interdependencies of a started dataset are fixed and override never
updated the run description in the database, only the in memory object
and data exported from it. Nothing uses it anymore since measurements no
longer unfreeze the interdependencies on exit.

Remove the argument from the private DataSetInMem method outright.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant