Skip to content

Using pytest fixtures to improve benchmarking tests #892

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

Merged
merged 1 commit into from
Jul 27, 2025

Conversation

prady0t
Copy link
Collaborator

@prady0t prady0t commented Jul 27, 2025

What type of PR is this? (check all applicable)

  • πŸ’Ύ Refactor
  • πŸͺ„ Feature
  • 🐞 Bug Fix
  • πŸ”§ Optimization
  • πŸ“š Documentation
  • πŸ§ͺ Test
  • πŸ› οΈ Other

Related issues

Checklist

  • Code follows style guide
  • Tests added
  • Documented the changes

Please explain your changes below.

@prady0t
Copy link
Collaborator Author

prady0t commented Jul 27, 2025

@hameerabbasi, These were some places where fixtures could be used.

Copy link

codspeed-hq bot commented Jul 27, 2025

CodSpeed Performance Report

Merging #892 will degrade performances by 31.97%

Comparing prady0t:adding-fixtures (2029adf) with main (32ab23d)

Summary

⚑ 1 improvements
❌ 1 regressions
βœ… 257 untouched benchmarks
πŸ†• 81 new benchmarks
⁉️ 81 dropped benchmarks

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

Benchmarks breakdown

Benchmark BASE HEAD Change
❌ test_index_fancy[side=100-rank=1-format='coo'] 913.3 ¡s 1,342.4 ¡s -31.97%
⚑ test_index_slice[side=100-rank=2-format='gcxs'] 2.5 ms 2.3 ms +10.72%
⁉️ test_matmul[m=1000-n=1000-p=1000-coo] 39.2 ms N/A N/A
πŸ†• test_matmul[m=1000-n=1000-p=1000-format='coo'] N/A 39.2 ms N/A
πŸ†• test_matmul[m=1000-n=1000-p=1000-format='gcxs'] N/A 27 ms N/A
⁉️ test_matmul[m=1000-n=1000-p=1000-gcxs] 27 ms N/A N/A
⁉️ test_matmul[m=1000-n=1000-p=200-coo] 9.1 ms N/A N/A
πŸ†• test_matmul[m=1000-n=1000-p=200-format='coo'] N/A 9.1 ms N/A
πŸ†• test_matmul[m=1000-n=1000-p=200-format='gcxs'] N/A 10.2 ms N/A
⁉️ test_matmul[m=1000-n=1000-p=200-gcxs] 10.2 ms N/A N/A
⁉️ test_matmul[m=1000-n=1000-p=500-coo] 20.7 ms N/A N/A
πŸ†• test_matmul[m=1000-n=1000-p=500-format='coo'] N/A 20.5 ms N/A
πŸ†• test_matmul[m=1000-n=1000-p=500-format='gcxs'] N/A 21.2 ms N/A
⁉️ test_matmul[m=1000-n=1000-p=500-gcxs] 21.2 ms N/A N/A
⁉️ test_matmul[m=1000-n=200-p=1000-coo] 13 ms N/A N/A
πŸ†• test_matmul[m=1000-n=200-p=1000-format='coo'] N/A 12.9 ms N/A
πŸ†• test_matmul[m=1000-n=200-p=1000-format='gcxs'] N/A 14.3 ms N/A
⁉️ test_matmul[m=1000-n=200-p=1000-gcxs] 14.3 ms N/A N/A
⁉️ test_matmul[m=1000-n=200-p=200-coo] 3.5 ms N/A N/A
πŸ†• test_matmul[m=1000-n=200-p=200-format='coo'] N/A 3.5 ms N/A
... ... ... ... ...

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

Copy link
Collaborator

@hameerabbasi hameerabbasi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @prady0t!

@prady0t prady0t merged commit 926f0a5 into pydata:main Jul 27, 2025
16 of 19 checks 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.

2 participants