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

chore: 🤖 add benchmarks #123

Merged
merged 3 commits into from
Apr 8, 2024
Merged

chore: 🤖 add benchmarks #123

merged 3 commits into from
Apr 8, 2024

Conversation

theashraf
Copy link
Member

@theashraf theashraf commented Apr 4, 2024

Changes:

  • Added few benchmarks for the performance critical pieces of dotlottie_player_core:
    • animation loop
    • load dotLottie file
    • load Lottie animation by data
    • load Lottie animation by path
    • load a dotLottie theme

Usage:

  • run make bench or cargo bench inside dotlottie-rs crate
  • An HTML report displaying the results of the benchmark under dotlottie-rs/target/criterion/report/index.html. By default, the plots are generated using gnuplot if it is available, or the plotters crate if it is not.

Catching performance regression:

  • For future PRs
  • Check out the main branch of your code
  • Ensure dotlottie-rs/target/criterion/ is empty, maybe run cargo clean
  • Build it and run the benchmarks once, to establish a baseline
  • Then switch to the pull request branch
  • Built it again and run the benchmarks a second time to compare against the baseline.

Fix #124

Copy link

changeset-bot bot commented Apr 4, 2024

⚠️ No Changeset found

Latest commit: d43fcac

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@theashraf theashraf self-assigned this Apr 4, 2024
@theashraf theashraf merged commit 3f49cad into main Apr 8, 2024
1 check passed
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.

Performance benchmarking
2 participants