Skip to main content

datacube-benchmark

Docs PyPI License: MIT

Utilities for benchmarking Zarr datacubes — generate synthetic stores with different chunking schemes, compressors, and dtypes, then measure read performance under realistic access patterns.

Companion package to the Datacube Guide, which documents common pitfalls when producing and consuming multi-dimensional data products.

Installation

pip install datacube-benchmark

Python 3.12+ is required.

Quickstart

Create a synthetic Zarr store on local disk and time a few random-access patterns against it:

from pathlib import Path

import obstore as obs
import zarr

import datacube_benchmark

path = Path.cwd() / "data" / "test.zarr"
path.mkdir(parents=True, exist_ok=True)
store = obs.store.LocalStore(str(path))
zarr_store = datacube_benchmark.create_zarr_store(store)

arr = zarr.open_array(zarr_store, zarr_version=3, path="data")
results = datacube_benchmark.benchmark_access_patterns(arr, num_samples=10)
print(results)

create_zarr_store takes target sizes and chunk shapes as strings or pint quantities (e.g. "1 GB", "10 MB"), and writes through an obstore store — so the same call works against a local directory, S3, GCS, or Azure by swapping the store.

What's in the box

  • create_zarr_store, create_or_open_zarr_store, create_or_open_zarr_array, create_empty_dataarray — build synthetic Zarr datacubes at a target size, resolution, and chunk shape.
  • benchmark_zarr_array — time random reads against one access pattern ("point", "time_series", "spatial_slice", "full") and return summary statistics with units attached.
  • benchmark_access_patterns — run all four access patterns and return the combined results as a pandas.DataFrame.
  • benchmark_dataset_open — time xarray.open_dataset on a Zarr store.
  • Config — a dataclass collecting the common knobs (compressor, target array size, sample counts, concurrency).

See the API reference for the full signatures and parameter docs.

License

MIT

Metadata

Release files for datacube-benchmark 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datacube-benchmark 0.1.0
File Size Uploaded Provenance Actions
datacube_benchmark-0.1.0.tar.gz 109.5 kB With provenance Details for datacube_benchmark-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datacube-benchmark 0.1.0
File Interpreter ABI Platform Actions
datacube_benchmark-0.1.0-py3-none-any.whl Python 3 none any Details for datacube_benchmark-0.1.0-py3-none-any.whl

Total release size: 123.0 kB

Release files / datacube_benchmark-0.1.0.tar.gz

Download URL datacube_benchmark-0.1.0.tar.gz
Size 109.5 kB
Tags Source
SHA-256 checksum
How to use checksums
50bee51dd6e5373b465b4b3745110c766b9d275af44406a18c95221bb729dc04
BLAKE2b-256 checksum
How to use checksums
cf6a6bf5599c0644a8498cfd3c0fab67fe566a63bb829b10e91642ca78b69d08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Release files / datacube_benchmark-0.1.0-py3-none-any.whl

Download URL datacube_benchmark-0.1.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69572ac5d8c9d900b8734484061b9186c560faddb0be429831382a2c525f185a
BLAKE2b-256 checksum
How to use checksums
18861f36215ef253cd3a8d91e6e3a907deb9ac532631ac55553c8ac8d6293fc0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Security for datacube-benchmark 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for datacube_benchmark-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page