Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding ability to use a cache with accessors #84

Merged
merged 42 commits into from
Dec 6, 2023

Conversation

ptahmose
Copy link
Contributor

@ptahmose ptahmose commented Dec 4, 2023

Description

  • adding the option to use a cache with the accessors
  • an implementation of a simple cache
  • adding an example of its usage to CZIcmd
  • unrelated: updated CLI11 to latest version (c.f. here), no changes in functionality expected for our usage
  • added an option to enable/disable the"non-visible-tile-optimization" from non-visible-tiles-optimization for multi-tile-composition #78 to CZICmd.

The PR is addressing #77.

With the CZI-document mentioned in #73 I get the following runtimes for

description run-time command line
with 50MB cache and w/o visibility-check-optimization 3m 16s .\CZIcmd.exe "-c" "PlaneScan" "-p" "C0" "-s" "sample_from_73.czi" "-r" "rel(0,0,44296,36989)" "-o" "I:\scanplane\test" "-z" "1" "--cachesize" "50Mi" -b 0 --tilesize-for-plane-scan 512x512
with 50MB cache and w/ visibility-check-optimization 2m 47s .\CZIcmd.exe "-c" "PlaneScan" "-p" "C0" "-s" "sample_from_73.czi" "-r" "rel(0,0,44296,36989)" "-o" "I:\scanplane\test" "-z" "1" "--cachesize" "50Mi" -b 0 --tilesize-for-plane-scan 512x512 --use-visibility-check-optimization
no cache and w/o visibility-check-optimization 11m 50s .\CZIcmd.exe "-c" "PlaneScan" "-p" "C0" "-s" "sample_from_73.czi" "-r" "rel(0,0,44296,36989)" "-o" "I:\scanplane\test" "-z" "1" "--cachesize" "0Mi" -b 0 --tilesize-for-plane-scan 512x512
no cache and w/ visibility-check-optimization 10m 02s `.\CZIcmd.exe "-c" "PlaneScan" "-p" "C0" "-s" "sample_from_73.czi" "-r" "rel(0,0,44296,36989)" "-o" "I:\scanplane\test" "-z" "1" "--cachesize" "0Mi" -b 0 --tilesize-for-plane-scan 512x512 --use-visibility-check-optimization

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • locally (using CZICmd and the newly added command)
  • unittests

Checklist:

  • I followed the Contributing Guidelines.
  • I did a self-review.
  • I commented my code, particularly in hard-to-understand areas.
  • I updated the documentation.
  • I updated the version of libCZI following Versioning of libCZI depending on the type of change
    • Bug fix -> PATCH
    • New feature -> MINOR
    • Breaking change -> MAJOR
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@ptahmose ptahmose requested a review from a team December 4, 2023 16:55
Copy link

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (5e5f8ab) 65.07% compared to head (5ebc905) 65.38%.

Files Patch % Lines
Src/libCZI/SingleChannelAccessorBase.cpp 85.18% 4 Missing ⚠️
Src/libCZI/SingleChannelScalingTileAccessor.cpp 87.50% 2 Missing ⚠️
...c/libCZI/SingleChannelPyramidLevelTileAccessor.cpp 83.33% 1 Missing ⚠️
Src/libCZI/subblock_cache.cpp 98.46% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   65.07%   65.38%   +0.31%     
==========================================
  Files          81       83       +2     
  Lines       10511    10621     +110     
==========================================
+ Hits         6840     6945     +105     
- Misses       3671     3676       +5     
Flag Coverage Δ
windows-latest 65.38% <94.36%> (+0.31%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Src/CZICmd/CMakeLists.txt Show resolved Hide resolved
Src/CZICmd/execute.cpp Show resolved Hide resolved
Src/libCZI/SingleChannelPyramidLevelTileAccessor.cpp Outdated Show resolved Hide resolved
Src/libCZI/SingleChannelScalingTileAccessor.cpp Outdated Show resolved Hide resolved
Src/libCZI/SingleChannelScalingTileAccessor.cpp Outdated Show resolved Hide resolved
Src/libCZI/SingleChannelAccessorBase.cpp Show resolved Hide resolved
Src/libCZI/subblock_cache.h Outdated Show resolved Hide resolved
@ptahmose ptahmose requested a review from a team December 5, 2023 12:24
@ptahmose ptahmose added the cla Contributor License Agreement sent to Admin label Dec 6, 2023
@ptahmose ptahmose marked this pull request as ready for review December 6, 2023 00:28
@ptahmose ptahmose requested a review from a team December 6, 2023 00:50
@ptahmose ptahmose merged commit 8dbc3f0 into ZEISS:main Dec 6, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla Contributor License Agreement sent to Admin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants