On Fri, Jun 24, 2022 at 1:25 PM Mark Allen <[email protected]> wrote:
> Specifically, I'm trying to do this exact thing, but with Sequel instead > of ActiveRecord > > > https://github.com/rmosolgo/graphql-ruby/blob/master/guides/dataloader/testing.md#testing-dataloader-sources > > On Friday, June 24, 2022 at 4:22:29 PM UTC-4 Mark Allen wrote: > >> Hi, I want to count the number of DB operations within a block. Can't >> find any documentation how to do this. Found DB.extend_datasets which looks >> promising but can't find a way to UN-extend_dataset after. Thoughts? >> > The easiest way is probably using a Database logger, and seeing how many queries are logged during the block. You can remove the logger when the block exits. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sequel-talk/CADGZSSeW-aH3aOeunxNjzuS%2BLfMRHNLNymDC%3D%3Dqu0MLJe2Op7g%40mail.gmail.com.
