на сайте с May 03, 2023 02:47
RSpec matcher to control number of SQL queries executed by a block of code. It wraps the answer at Stack Overflow by Ryan Bigg, which based on Active Support Notification and Instrumentation mechanisms. For motivation and details see my blog post "Fighting the Hydra of N+1 queries" in the Martian Chronicles.