Rewriting the scope_all benchmark in Sequel and Raw


Its interesting to see 77 vs 942, it really drives home how much overhead AR brings to the table.


Can you update that post with all your results to date on this specific test?

Also, can you run it on Rails 2/3/4 for a quick and dirty comparison.

(I know it will be eventually backfilled, but I am curious) :wink:


sure @sam, I’m on it :thumbsup:

// Activerecord




// Sequel


// Raw pg


^ Here it is @sam :slight_smile:

Btw, I didn’t managed to run benchmark for rails 2, I couldn’t require rails gem in benchmark script. Not sure where’s the problem :confused:


Awesome, now that you have this data. I want the graph amended so it can display a comparison of all these 5 results! Start hacking away at the web UI and the backfill.

Only focus on this single test, this is the only test you care about till we can render the 5 lines here and get it backfilled :wink:

If you have to drop the whole “prepared” vs “non prepared” stuff and always do “prepared” for now so be it.

cc @tgxworld

Don’t worry about Rails 2 for now.


@sem Just to make myself sure. Since this is graph with commit data, you want me to include here commits for sequel and pg. Therefore it would have 3 lines (AR, sequel, pg) and graph would look something like this:

Maybe better place to display results for older Rails releases would be here?

GSOC 2017 - Long Running Ruby and Rails Benchmarks

Yes, absolutely, this is what I want you to work towards!

Possibly, let’s not worry about that for now, just for now worry about getting the graph with the 3 lines going and backfilling all the info. Work with @tgxworld on gaining access to prd.

GSOC 2017 - Long Running Ruby and Rails Benchmarks

How are you going with this? Are you blocked on anything from our side?


@sam, I am not blocked on anything. Right now I am working on web to display graphs to compare. My first goal is to display sequel along with AR because sequel has been already added. Here’s wip PR on web.


Fantastic, focus on getting stuff merged and on the site as soon as you can. I prefer to have a slightly janky UI than wait weeks till we have the UI in perfect state.


Little peek. This is with data from production imported in local. UI is not perfect and has some issues but before I get into fixing it I’ll make sure sequel benchmark graphs are being displayed.

Though I am not sure why sequel is not being displayed since it looks like been added :confused:

@tgxworld pls take a look at this one :arrow_down: :pray:


Cool!!! how far do you feel we are from having something on


Hey @sam,

PR is some time in reviewing process. According to me it’s ready to be merged. When it’s merged we could compare benchmarks on rubybench.

Jeremy configured sequel repo with webhook to send push events on rubybench, so next time when he pushes something we should have sequel repo with it’s benchmarks on rubybench :tada:


@bmarkons Merged and deployed :slight_smile:


Is there anything you need from me to get the Sequel benchmarks? We should probably start back-filling the benchmarks.


Great! Thanks so much for help :slight_smile:

Is there anything you need from me to get the Sequel benchmarks?

We should have first sequel runs displayed on Jeremy’s next push.

We should probably start back-filling the benchmarks.

You mean running them?


Yup you can look for the last 2000 commit ids and run the benchmarks for them :slight_smile:


Status update

We are receiving push events from sequel repo properly. We have very first sequel benchmark results on RubyBench. Some errors prevented all benchmarks to be displayed but I am working on it.

Once we have this one merged I will run benchmarks for sequel last 2000 commits. After that we should be able to compare them with AR.


Everything works properly for sequel benchmarks, all are present on RubyBench :tada:
The only thing left is to run suite for last 2000 commits manually.


I’ve run sequel suite for last 2000 commits. Everything is fine for now, it will definitely need some time to finish :slight_smile:


@bmarkons can you have a look into

The commit hash do not seem to be displayed correctly.