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(python): Update benchmark tests #15825

Merged
merged 11 commits into from
Apr 23, 2024
Merged

test(python): Update benchmark tests #15825

merged 11 commits into from
Apr 23, 2024

Conversation

stinodego
Copy link
Member

@stinodego stinodego commented Apr 21, 2024

Changes

  • Rewrite the R script for data generation as a Python script
  • Use smaller data for benchmark tests. CodSpeed tests should be ran on tiny data, so we are now using 1000 10_000 rows.
  • Since the data is small, we don't have to write it to disk for re-use, we can generate it on the fly. Reorganized things a bit to take advantage of this.
  • Some tests were marked as benchmark tests but didn't need to be. I marked those as 'release' and moved them to the unit test module.

@stinodego stinodego changed the title ci(python): Update benchmark tests test(python): Update benchmark tests Apr 21, 2024
@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars labels Apr 21, 2024
@stinodego stinodego marked this pull request as ready for review April 21, 2024 22:07
Copy link

codecov bot commented Apr 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.38%. Comparing base (b4e43d7) to head (f8f988e).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15825      +/-   ##
==========================================
- Coverage   80.38%   80.38%   -0.01%     
==========================================
  Files        1263     1263              
  Lines      165346   165368      +22     
==========================================
+ Hits       132918   132926       +8     
- Misses      32428    32442      +14     

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

Copy link

codspeed-hq bot commented Apr 21, 2024

CodSpeed Performance Report

Merging #15825 will improve performances by ×560

Comparing bench-python (f8f988e) with main (1c6b7b7)

Summary

⚡ 2 improvements

🆕 11 new benchmarks
⁉️ 20 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main bench-python Change
test_filter1 1,191.4 ms 2.1 ms ×560
test_filter2 1,988.2 ms 2.8 ms ×720
🆕 test_groupby_h2oai_q1 N/A 8.6 ms N/A
🆕 test_groupby_h2oai_q10 N/A 32.1 ms N/A
🆕 test_groupby_h2oai_q2 N/A 19.5 ms N/A
🆕 test_groupby_h2oai_q3 N/A 8.8 ms N/A
🆕 test_groupby_h2oai_q4 N/A 7.9 ms N/A
🆕 test_groupby_h2oai_q5 N/A 7.7 ms N/A
🆕 test_groupby_h2oai_q6 N/A 50.2 ms N/A
🆕 test_groupby_h2oai_q7 N/A 8.4 ms N/A
🆕 test_groupby_h2oai_q8 N/A 10.6 ms N/A
🆕 test_groupby_h2oai_q9 N/A 107.6 ms N/A
⁉️ test_h2oai_groupby_q1 5.3 s N/A N/A
⁉️ test_h2oai_groupby_q10 40.4 s N/A N/A
⁉️ test_h2oai_groupby_q2 12.9 s N/A N/A
⁉️ test_h2oai_groupby_q3 9.1 s N/A N/A
⁉️ test_h2oai_groupby_q4 6.8 s N/A N/A
⁉️ test_h2oai_groupby_q5 7.2 s N/A N/A
⁉️ test_h2oai_groupby_q6 14.1 s N/A N/A
⁉️ test_h2oai_groupby_q7 8.5 s N/A N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@ritchie46
Copy link
Member

Use smaller data for benchmark tests. CodSpeed tests should be ran on tiny data, so we are now using 1000 rows.

Is 10_000 or 50_000 still acceptable? I feel 1000 is too nano for Polars.

@stinodego
Copy link
Member Author

Is 10_000 or 50_000 still acceptable? I feel 1000 is too nano for Polars.

I think that would be fine. I updated to 10_000 rows, let's see how long each benchmark test takes now.

@stinodego stinodego marked this pull request as draft April 22, 2024 09:38
@stinodego stinodego marked this pull request as ready for review April 22, 2024 12:41
@stinodego stinodego merged commit fd41e03 into main Apr 23, 2024
17 of 18 checks passed
@stinodego stinodego deleted the bench-python branch April 23, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants