Skip to content

ENH: Add PDB reader benchmark to track parsing performance#5394

Merged
orbeckst merged 9 commits into
MDAnalysis:developfrom
Dreamstick9:add-pdb-benchmark
Jun 23, 2026
Merged

ENH: Add PDB reader benchmark to track parsing performance#5394
orbeckst merged 9 commits into
MDAnalysis:developfrom
Dreamstick9:add-pdb-benchmark

Conversation

@Dreamstick9

@Dreamstick9 Dreamstick9 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Changes made in this Pull Request:

  • Contributes to performance benchmarks #1023
  • Added PDBReaderBench class to benchmarks/benchmarks/traj_reader.py.
  • it benchmarks PDB format reading and parsing across different number of frames ([10, 100, 500]) using the standard PDB test file.

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no

PR Checklist

  • Issue raised/referenced?
  • Tests updated/added?
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS? (If it is not, add it!)
  • LLM/AI disclosure was updated.

Developers Certificate of Origin

I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.13%. Comparing base (f765ecd) to head (529bbcf).

❗ There is a different number of reports uploaded between BASE (f765ecd) and HEAD (529bbcf). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (f765ecd) HEAD (529bbcf)
5 2
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5394      +/-   ##
===========================================
- Coverage    93.85%   86.13%   -7.72%     
===========================================
  Files          182      182              
  Lines        22509    22509              
  Branches      3202     3202              
===========================================
- Hits         21125    19388    -1737     
- Misses         922     2668    +1746     
+ Partials       462      453       -9     

☔ 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.

Comment thread benchmarks/benchmarks/traj_reader.py Outdated
@Dreamstick9 Dreamstick9 requested a review from tylerjereddy June 3, 2026 04:57
@Dreamstick9 Dreamstick9 marked this pull request as ready for review June 7, 2026 20:04
Comment thread benchmarks/benchmarks/traj_reader.py Outdated
Comment thread benchmarks/benchmarks/traj_reader.py Outdated
Comment thread benchmarks/benchmarks/traj_reader.py Outdated
Comment thread package/CHANGELOG Outdated
@Dreamstick9 Dreamstick9 requested a review from orbeckst June 20, 2026 16:36
@Dreamstick9

Copy link
Copy Markdown
Contributor Author

I believe all these tests that are failing are due to something messed up in develop, I will try to trace the root cause and will report on discord about this

@orbeckst orbeckst self-assigned this Jun 22, 2026
@orbeckst

Copy link
Copy Markdown
Member

The CI failures are being addressed in other PRs. Apart from PR #5404 all quick-fix PRs are merged. You can pull the current develop branch and merge it into your add-pdb-benchmark.

Can you please locally run the trajectory benchmarks and paste the output so that I can see that the new PDB one is running with everything else?

@orbeckst orbeckst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good.

Can you please locally run the trajectory benchmarks and paste the output so that I can see that the new PDB one is running with everything else?

@orbeckst orbeckst added the benchmarks performance benchmarking with ASV label Jun 22, 2026
@Dreamstick9

Copy link
Copy Markdown
Contributor Author

The CI failures are being addressed in other PRs. Apart from PR #5404 all quick-fix PRs are merged. You can pull the current develop branch and merge it into your add-pdb-benchmark.

Can you please locally run the trajectory benchmarks and paste the output so that I can see that the new PDB one is running with everything else?

· Discovering benchmarks
· Running 2 total benchmarks (1 commits * 1 environments * 2 benchmarks)
[ 0.00%] ·· Benchmarking existing-py_usr_local_bin_python3
[25.00%] ··· traj_reader.TrajReaderCreation.time_reads                                                                                                                                                   ok
[25.00%] ··· ============= ==========
              traj_format            
             ------------- ----------
                  XTC       4.09±0ms 
                  TRR       13.4±0ms 
                  DCD       1.64±0ms 
                  NCDF      5.69±0ms 
                  TRC       3.55±0ms 
                  PDB       6.70±0ms 
             ============= ==========

[50.00%] ··· traj_reader.TrajReaderIteration.time_strides                                                                                                                                                ok
[50.00%] ··· ============= ==========
              traj_format            
             ------------- ----------
                  XTC       8.07±0ms 
                  TRR       56.9±0ms 
                  DCD       4.01±0ms 
                  NCDF      1.80±0ms 
                  TRC       3.46±0ms 
                  PDB       5.40±0ms 
             ============= ==========
Screenshot 2026-06-23 at 2 10 12 PM

@orbeckst orbeckst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for the new benchmarks!

@orbeckst orbeckst merged commit 32b7808 into MDAnalysis:develop Jun 23, 2026
14 of 25 checks passed
@Dreamstick9

Copy link
Copy Markdown
Contributor Author

LGTM, thank you for the new benchmarks!

Thanks!, also I have started to work on another benchmark, maybe XYZ format

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

Labels

benchmarks performance benchmarking with ASV

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants