Skip to content

test: add benchmark tests for encode/decode operations - #56

Open
sumanjeet0012 wants to merge 2 commits into
multiformats:masterfrom
sumanjeet0012:fix-issue-42
Open

test: add benchmark tests for encode/decode operations#56
sumanjeet0012 wants to merge 2 commits into
multiformats:masterfrom
sumanjeet0012:fix-issue-42

Conversation

@sumanjeet0012

Copy link
Copy Markdown
Contributor

Fixes #42

Description

This pull request adds benchmark tests for all encodings to establish performance baselines and help catch regressions. Similar to the benchmarks in go-multibase (BenchmarkEncode, BenchmarkDecode, BenchmarkRoundTrip), these benchmark tests run across all supported implementations.

Changes

  • Installed pytest-benchmark as a development dependency in pyproject.toml.
  • Added tests/test_benchmarks.py containing test_bench_encode, test_bench_decode, and test_bench_roundtrip parameterized across all ENCODINGS.

@acul71 acul71 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review (maintainer)

Thanks for the clean benchmark addition — it matches #42 and the go-multibase encode/decode/roundtrip shape, and local/CI validation looks good once pytest-benchmark is present.

Blocking

Missing newsfragment — this is a mandatory requirement for approval.

Please add something like:

  • newsfragments/42.misc.rst (or 42.internal.rst)

with a short ReST line describing the change for HISTORY, ending with a trailing newline. Example:

Added pytest-benchmark encode/decode/roundtrip benchmarks covering all multibase encodings.

Non-blocking but important

  1. Branch is 6 commits behind master — please rebase (or merge) onto current origin/master before landing.
  2. CI cost: these benchmarks run in the normal pytest suite (~40s+ locally for 72 timed cases). Consider default-disabling them in regular CI (--benchmark-disable / config) and documenting how to run them explicitly, unless we intentionally want always-on timings.
  3. pyproject.toml overlap with open PRs #49 and #57 — informational only; expect a trivial dependency-list conflict when those merge.

Full structured review saved locally as AI-PR-REVIEW-56-0.md.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No benchmark tests for encode/decode operations

2 participants