core icon indicating copy to clipboard operation
core copied to clipboard

add benchmarks, initially for OcrdMets build/search

Open kba opened this issue 5 years ago • 1 comments
trafficstars

While developing #582 I wanted to know how the changes affect speed, so I set up a performance test on a typical METS file as it would be created by a sequence of OCR-D processors. In the test, METS with various numbers of pages is created and the OcrdMets.find_files and OcrdMets.add_file methods are tested.

We could benchmark different aspects of the code or even processors and workflows in the same vein. We could also make that part of our CI tests, maybe with a benchmark branch that can be (force-)pushed to to create performance tests, possibly feeding the results to some service to see how throughput changes (hopefully: improves) over time.

kba avatar Sep 02 '20 09:09 kba

Codecov Report

Merging #585 (69f7424) into master (db79ff6) will increase coverage by 4.64%. The diff coverage is n/a.

:exclamation: Current head 69f7424 differs from pull request most recent head 32a9085. Consider uploading reports for the commit 32a9085 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #585      +/-   ##
==========================================
+ Coverage   79.95%   84.60%   +4.64%     
==========================================
  Files          56       49       -7     
  Lines        3488     2813     -675     
  Branches      706      550     -156     
==========================================
- Hits         2789     2380     -409     
+ Misses        565      332     -233     
+ Partials      134      101      -33     
Impacted Files Coverage Δ
ocrd/ocrd/cli/process.py 76.92% <0.00%> (-15.94%) :arrow_down:
ocrd_utils/ocrd_utils/image.py 56.57% <0.00%> (-15.17%) :arrow_down:
ocrd_models/ocrd_models/ocrd_xml_base.py 91.30% <0.00%> (-8.70%) :arrow_down:
ocrd_utils/ocrd_utils/logging.py 90.56% <0.00%> (-8.17%) :arrow_down:
ocrd/ocrd/workspace.py 68.31% <0.00%> (-3.26%) :arrow_down:
ocrd_utils/ocrd_utils/str.py 89.53% <0.00%> (-1.47%) :arrow_down:
..._validators/ocrd_validators/workspace_validator.py 84.06% <0.00%> (-1.07%) :arrow_down:
ocrd_modelfactory/ocrd_modelfactory/__init__.py 87.09% <0.00%> (-0.41%) :arrow_down:
ocrd_validators/ocrd_validators/page_validator.py 77.19% <0.00%> (-0.30%) :arrow_down:
ocrd_models/ocrd_models/ocrd_mets.py 93.13% <0.00%> (-0.29%) :arrow_down:
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 197437b...32a9085. Read the comment docs.

codecov-commenter avatar Sep 02 '20 10:09 codecov-commenter