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

Add a benchmark for apply_diff #525

Merged
merged 1 commit into from
Feb 24, 2025
Merged

Add a benchmark for apply_diff #525

merged 1 commit into from
Feb 24, 2025

Conversation

Swatinem
Copy link
Contributor

I’m actually surprised that it is reasonably quick. But then I remembered that the runtime depends on the size of the diff, not on the size of the report, so things scale differently.

                                          Benchmark Results                                          
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━┓
┃                                       Benchmark ┃   Time (best) ┃ Rel. StdDev ┃ Run time ┃  Iters ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━┩
│            test_report_diff_calculation[Report] │         973ns │        4.4% │    2.98s │ 14,555 │
│    test_report_diff_calculation[FilteredReport] │       1,915ns │        1.9% │    2.92s │ 10,295 │
└─────────────────────────────────────────────────┴───────────────┴─────────────┴──────────┴────────┘

@Swatinem Swatinem requested a review from a team February 24, 2025 09:10
@Swatinem Swatinem self-assigned this Feb 24, 2025
Copy link

codspeed-hq bot commented Feb 24, 2025

CodSpeed Performance Report

Merging #525 will create unknown performance changes

Comparing swatinem/bench-diff (bd33a70) with main (c3a2f78)

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.\

Copy link
Contributor

@giovanni-guidini giovanni-guidini left a comment

Choose a reason for hiding this comment

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

The standard deviation for the regular report is somewhat high compared to the filtered report. I wonder why that is... if it's the same process repeated many times.

@Swatinem
Copy link
Contributor Author

You are right, yes. Not quite sure why that is. Maybe its just a fluke when I ran this locally, but its also possible that some internal caching is going on there.

@Swatinem Swatinem added this pull request to the merge queue Feb 24, 2025
Merged via the queue into main with commit aba4c5c Feb 24, 2025
8 checks passed
@Swatinem Swatinem deleted the swatinem/bench-diff branch February 24, 2025 10:26
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.

2 participants