Question

I am trying to profile the queries in my Sinatra app, which uses the Sequel ORM and MySql, through the mysql2 adapter. I'm using Rack::MiniProfiler, and the profiler seems to be working except it is not showing any queries, even though there are many of them being run on the page in question.

To use miniprofiler, all I have done is require 'rack-mini-profiler' and use Rack::MiniProfiler.

Am I missing some needed configuration to ensure the Sequel queries are picked up?

Here's a screenshot of miniprofiler's output:

enter image description here

If this cannot be made to work, I am also open to other suggestions to solve the query profiling problem, though I have tried Rack::Bug as well, and it too failed to pick up the Sequel queries.

Was it helpful?

Solution

Make sure to require 'sequel' before require 'rack-mini-profiler'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top