Skip to content

chore: add minimal pytest benchmarks - #165

Draft
maxrjones wants to merge 3 commits into
mainfrom
test/reader-benchmarks
Draft

maxrjones wants to merge 3 commits into
mainfrom
test/reader-benchmarks

Conversation

@maxrjones

Copy link
Copy Markdown
Member

This PR adds some very minimal benchmarking. I created this in order to evaluate #151 relative to a dask-free alternative implementations.

Testing

PR checks

  • Standard CI runs automatically on each push.
  • To run the CDK synth check, add the run-cdk-checks label to this PR.
  • If you push more commits after that run completes, remove and re-add the label to run it again.
  • To trigger a dev deployment, add the deploy-dev label. It smoke-tests tiles from the native MUR, virtual MUR, and virtual NLDAS Icechunk stores after deployment.

maxrjones and others added 2 commits September 30, 2026 15:03
…tion

pytest-benchmark cases for reader open, tile and point on a generated
4x720x1440 zarr store. The store is wrapped in zarr's `LatencyStore`
(0 and 30 ms per `get`) so window-vs-slice reads and batched-vs-serial
round trips show up as time, and a counting wrapper records
`store_gets` per operation in extra_info as an exact, branch-comparable
number. Skipped unless --benchmark-only/--benchmark-enable is given, so
the normal suite is unaffected. The fixture already carries 2-D mask
and flag variables so a masking feature can add its cases without
changing the store.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
zarr only derives a copy of the store through `_with_store` when opening
a writable store in mode "r". Wrapping a read-only LocalStore means the
counting instance is used as-is, so the shared counter cell, the
`_with_store` override and `reset()` can go; the count is a plain
attribute. `_record` now asserts the count is non-zero so a future zarr
change that reintroduces a copy fails loudly rather than reporting 0.

zarr's LoggingStore was considered instead: it gives identical counts
but calls inspect.stack() per store call (~0.7 ms each), which roughly
doubled the 0 ms latency timings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the chore label Oct 1, 2026
Relocking in the development sandbox wrote two things unrelated to this
branch into uv.lock:
- an [options] block with exclude-newer-span = "P1W" (the sandbox's
  package-install cooldown), which does not belong upstream;
- four dependency markers removed (pycparser, h11, truststore,
  ptyprocess) by a different uv version; relocking an untouched main
  with that uv produces the same lines.

Restore main's lines for both; the branch's own dependency change and the
titiler-multidim 0.9.0 -> 0.9.1 self-version (main's lock is stale after
the 0.9.1 release) are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@maxrjones
maxrjones requested a review from hrodmn October 2, 2026 15:54
@maxrjones
maxrjones marked this pull request as draft October 2, 2026 19:17
@maxrjones

Copy link
Copy Markdown
Member Author

I'm going to convert this to a draft. It's been useful for me testing out PRs, but I'm sure there's a better way to implement these benchmarks. So I'd like to take more time on this one before asking for a review.

@maxrjones maxrjones self-assigned this Oct 5, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant