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

test(paragraph): simplify paragraph benchmarks #282

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

joshka
Copy link
Member

@joshka joshka commented Jun 27, 2023

Reduce benchmarks from 60 calls to 18. Now 3 different line counts
(64, 2048, 65535) * 6 different tests (new, render, scroll half / full,
wrap, wrap and scroll)

image image

Reduce benchmarks from 60 calls to 18. Now 3 different line counts
(64, 2048, 65535) * 6 different tests (new, render, scroll half / full,
wrap, wrap and scroll)
@joshka
Copy link
Member Author

joshka commented Jun 27, 2023

@haydenflinner given you're recently been benchmarking, do these look a little better to you?

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #282 (b424dda) into main (6bdb97c) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
- Coverage   82.73%   82.71%   -0.02%     
==========================================
  Files          36       36              
  Lines        7360     7360              
==========================================
- Hits         6089     6088       -1     
- Misses       1271     1272       +1     

see 1 file with indirect coverage changes

@haydenflinner
Copy link

Yep, looks good to me! I was surprised at how many paragraph benches there were, prior. This looks more representative too.

Copy link
Member

@mindoodoo mindoodoo left a comment

Choose a reason for hiding this comment

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

Looks so much better, thanks a lot for this man !

Out of curiosity, do you know what made the code coverage regress a little bit src/widget/mod.rs ?

@joshka
Copy link
Member Author

joshka commented Jun 29, 2023

Out of curiosity, do you know what made the code coverage regress a little bit src/widget/mod.rs ?

Looking at https://app.codecov.io/gh/tui-rs-revival/ratatui/pull/282/indirect-changes?src=pr&el=tree-more, it suggests that we probably don't have a test case for one branch of the Debug impl on Borders (which wasn't tested by this code 🤷‍♂️).

@joshka joshka added this pull request to the merge queue Jun 29, 2023
Merged via the queue into ratatui-org:main with commit cf8eda0 Jun 29, 2023
15 of 17 checks passed
@joshka joshka deleted the bench-paragraph branch July 4, 2023 20:46
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.

None yet

4 participants