Skip to content

test: Avoid unneeded allocations in assertions#1335

Merged
joshka merged 2 commits intoratatui:mainfrom
mo8it:assert-vec
Aug 22, 2024
Merged

test: Avoid unneeded allocations in assertions#1335
joshka merged 2 commits intoratatui:mainfrom
mo8it:assert-vec

Conversation

@mo8it
Copy link
Copy Markdown
Contributor

@mo8it mo8it commented Aug 22, 2024

A vector can be compared to an array.

@mo8it mo8it requested a review from a team as a code owner August 22, 2024 15:59
@mo8it mo8it changed the title Avoid unneeded allocations in assertions test: Avoid unneeded allocations in assertions Aug 22, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.1%. Comparing base (ed51c4b) to head (d61defc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1335   +/-   ##
=====================================
  Coverage   94.1%   94.1%           
=====================================
  Files         67      67           
  Lines      15627   15627           
=====================================
  Hits       14712   14712           
  Misses       915     915           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

Thanks

@joshka joshka merged commit 0d5f3c0 into ratatui:main Aug 22, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 22, 2024

🐰Bencher

ReportThu, August 22, 2024 at 16:22:25 UTC
ProjectRatatui
Branch1335/merge
Testbedubuntu-latest

⚠️ WARNING: The following Measure does not have a Threshold. Without a Threshold, no Alerts will ever be generated!

  • Latency (latency)

Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the --ci-only-thresholds CLI flag.

Click to view all benchmark results
BenchmarkLatencyLatency Results
nanoseconds (ns)
barchart/render/2048➖ (view plot)191,040.00
barchart/render/256➖ (view plot)127,010.00
barchart/render/64➖ (view plot)80,759.00
barchart/render_grouped/2048➖ (view plot)337,110.00
barchart/render_grouped/256➖ (view plot)133,870.00
barchart/render_grouped/64➖ (view plot)122,180.00
barchart/render_horizontal/2048➖ (view plot)162,970.00
barchart/render_horizontal/256➖ (view plot)81,065.00
barchart/render_horizontal/64➖ (view plot)74,989.00
block/render_all_feature/100x50➖ (view plot)10,042.00
block/render_all_feature/200x50➖ (view plot)18,009.00
block/render_all_feature/256x256➖ (view plot)84,080.00
block/render_empty/100x50➖ (view plot)5,527.60
block/render_empty/200x50➖ (view plot)10,964.00
block/render_empty/256x256➖ (view plot)71,083.00
buffer/empty/16➖ (view plot)789.93
buffer/empty/255➖ (view plot)220,950.00
buffer/empty/64➖ (view plot)13,157.00
buffer/filled/16➖ (view plot)784.71
buffer/filled/255➖ (view plot)229,710.00
buffer/filled/64➖ (view plot)13,365.00
buffer/with_lines/16➖ (view plot)8,680.80
buffer/with_lines/255➖ (view plot)9,242.80
buffer/with_lines/64➖ (view plot)9,523.70
line_render/Center/0➖ (view plot)3.71
line_render/Center/10➖ (view plot)449.41
line_render/Center/3➖ (view plot)238.62
line_render/Center/4➖ (view plot)263.05
line_render/Center/42➖ (view plot)575.00
line_render/Center/6➖ (view plot)280.48
line_render/Center/7➖ (view plot)316.34
line_render/Left/0➖ (view plot)3.71
line_render/Left/10➖ (view plot)401.00
line_render/Left/3➖ (view plot)161.58
line_render/Left/4➖ (view plot)173.72
line_render/Left/42➖ (view plot)575.81
line_render/Left/6➖ (view plot)266.54
line_render/Left/7➖ (view plot)279.88
line_render/Right/0➖ (view plot)3.72
line_render/Right/10➖ (view plot)407.53
line_render/Right/3➖ (view plot)230.63
line_render/Right/4➖ (view plot)270.83
line_render/Right/42➖ (view plot)575.13
line_render/Right/6➖ (view plot)351.92
line_render/Right/7➖ (view plot)403.91
list/render/16384➖ (view plot)1,152,800.00
list/render/2048➖ (view plot)267,680.00
list/render/64➖ (view plot)148,720.00
list/render_scroll_half/16384➖ (view plot)1,178,400.00
list/render_scroll_half/2048➖ (view plot)272,610.00
list/render_scroll_half/64➖ (view plot)102,620.00
paragraph/new/2048➖ (view plot)253,270.00
paragraph/new/64➖ (view plot)6,729.80
paragraph/new/65535➖ (view plot)8,376,600.00
paragraph/render/2048➖ (view plot)451,310.00
paragraph/render/64➖ (view plot)412,280.00
paragraph/render/65535➖ (view plot)1,550,500.00
paragraph/render_scroll_full/2048➖ (view plot)402,160.00
paragraph/render_scroll_full/64➖ (view plot)435,840.00
paragraph/render_scroll_full/65535➖ (view plot)1,481,300.00
paragraph/render_scroll_half/2048➖ (view plot)401,930.00
paragraph/render_scroll_half/64➖ (view plot)442,750.00
paragraph/render_scroll_half/65535➖ (view plot)1,489,500.00
paragraph/render_wrap/2048➖ (view plot)230,220.00
paragraph/render_wrap/64➖ (view plot)185,810.00
paragraph/render_wrap/65535➖ (view plot)1,337,900.00
paragraph/render_wrap_scroll_full/2048➖ (view plot)231,000.00
paragraph/render_wrap_scroll_full/64➖ (view plot)186,720.00
paragraph/render_wrap_scroll_full/65535➖ (view plot)1,376,600.00
rect_rows/rows/1024➖ (view plot)322.37
rect_rows/rows/16➖ (view plot)5.25
rect_rows/rows/65535➖ (view plot)20,299.00
sparkline/render/2048➖ (view plot)115,870.00
sparkline/render/256➖ (view plot)115,600.00
sparkline/render/64➖ (view plot)37,542.00

Bencher - Continuous Benchmarking
View Public Perf Page
Docs | Repo | Chat | Help

@mo8it mo8it deleted the assert-vec branch August 22, 2024 16:31
joshka pushed a commit to erak/ratatui that referenced this pull request Oct 14, 2024
theotchlx added a commit to theotchlx/ratatui that referenced this pull request Dec 16, 2024
Signed-off-by: Théo Tchilinguirian <theo.tchlx@gmail.com>
theotchlx added a commit to theotchlx/ratatui that referenced this pull request Dec 16, 2024
Signed-off-by: Théo Tchilinguirian <theo.tchlx@gmail.com>
theotchlx added a commit to theotchlx/ratatui that referenced this pull request Dec 22, 2024
Signed-off-by: Théo Tchilinguirian <theo.tchlx@gmail.com>
theotchlx added a commit to theotchlx/ratatui that referenced this pull request Dec 31, 2024
Signed-off-by: Théo Tchilinguirian <theo.tchlx@gmail.com>
theotchlx added a commit to theotchlx/ratatui that referenced this pull request Jan 11, 2025
Signed-off-by: Théo Tchilinguirian <theo.tchlx@gmail.com>
theotchlx added a commit to theotchlx/ratatui that referenced this pull request Jan 19, 2025
Signed-off-by: Théo Tchilinguirian <theo.tchlx@gmail.com>
takumi-earth pushed a commit to earthlings-dev/ratatui that referenced this pull request Jan 27, 2026
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