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

feat: add option to disable diffing #924

Merged
merged 1 commit into from
Nov 23, 2024
Merged

feat: add option to disable diffing #924

merged 1 commit into from
Nov 23, 2024

Conversation

noahnu
Copy link
Collaborator

@noahnu noahnu commented Nov 23, 2024

Description

For extremely large snapshot files, the diff algorithm is not very efficient. Until the algorithm can be modified to work with large files, there is now a --snapshot-diff-mode=disabled flag that can be specified to disable diffing on snapshot assertion failures.

Related Issues

Checklist

  • This PR has sufficient documentation.
  • This PR has sufficient test coverage.
  • This PR title satisfies semantic convention.

Additional Comments

No additional comments.

Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #924      +/-   ##
==========================================
+ Coverage   97.74%   97.75%   +0.01%     
==========================================
  Files          21       21              
  Lines        1596     1604       +8     
==========================================
+ Hits         1560     1568       +8     
  Misses         36       36              

🚨 Try these New Features:

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Benchmark

Benchmark suite Current: 62f6b7f Previous: 8c1208d Ratio
benchmarks/test_1000x.py::test_1000x_reads 0.7667252808720159 iter/sec (stddev: 0.12253267488025063) 0.8003550914304741 iter/sec (stddev: 0.057265148672985905) 1.04
benchmarks/test_1000x.py::test_1000x_writes 0.7030590549720851 iter/sec (stddev: 0.17395380844166844) 0.7749795092860265 iter/sec (stddev: 0.03690195509041565) 1.10
benchmarks/test_standard.py::test_standard 0.7510404105728492 iter/sec (stddev: 0.07141631877256495) 0.7703735784935567 iter/sec (stddev: 0.05530831375771462) 1.03

This comment was automatically generated by workflow using github-action-benchmark.

For extremely large snapshot files, the diff algorithm is not very efficient. Until the algorithm can be modified to work with large files, there is now a --snapshot-diff-mode=disabled flag that can be specified to disable diffing on snapshot assertion failures.
@noahnu noahnu merged commit d283e87 into main Nov 23, 2024
19 checks passed
@noahnu noahnu deleted the issue/581 branch November 23, 2024 22:40
@noahnu
Copy link
Collaborator Author

noahnu commented Nov 23, 2024

🎉 This PR is included in version 4.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Add option to disable snapshot diffing
1 participant