Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am rdubya on github.
  • I am rdubya (https://keybase.io/rdubya) on keybase.
  • I have a public key ASC0FSqZKYIjz4omj5lUJNhjS8G0qEho2jUJ7goPsVp5RAo

To claim this, I am signing this object:

@rdubya
rdubya / gist:36d63c61633826c0eb0461fcf3b51057
Last active October 16, 2017 19:16
Basic benchmark script for testing prepared statements in postgres arjdbc adapter. I ran it as part of the test suite, so that is why it is formatted as a test
require 'benchmark/ips'
class PostgresPerformanceTest < Test::Unit::TestCase
class Library < ActiveRecord::Base
has_many :books
end
class Book < ActiveRecord::Base
belongs_to :library
@rdubya
rdubya / log_silencer_test.rb
Last active August 29, 2015 14:22
Tests for Rails logger thread safety
# Activate the gem you are reporting the issue against.
gem 'activesupport', '4.2.1'
require 'active_support/logger'
require 'minitest/autorun'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
class BugTest < Minitest::Test