palkan / n_plus_one_control

RSpec and Minitest matchers to prevent N+1 queries problem
MIT License
553 stars 20 forks source link

Prepare to accept custom Collectors #46

Closed Earendil95 closed 2 years ago

Earendil95 commented 3 years ago

What is the purpose of this pull request?

From README.md:

N+1 problem is not a database specific: we can have N+1 Redis calls, N+1 HTTP external requests, etc. We can make n_plus_one_control customizable to support these scenarios (technically, we need to make it possible to handle different payload in the event subscriber).

This PR is going to add an ability to create custom Collectors so we can track N+1 "everywhere, for everyone, forever" (c).

What changes did you make? (overview)

Is there anything you'd like reviewers to focus on?

Not yet. This PR currently makes it easier to track my progress.

Checklist

Earendil95 commented 2 years ago

@palkan Thanks for the review! I've merged, as you suggested. Stay tuned, will post the other things ~soon~ someday :) Shall we create some issues out of the comment?

palkan commented 2 years ago

Shall we create some issues out of the comment?

Not necessary; PRs are better ))