Sha256: 18cd1cf0592e4cc4c14ab0f9ad8c3e53179319c68754cf29b57266ee1d84893b

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

require "active_record"
require "yaml"
require "stackviz"

ActiveRecord::Base.configurations["profile"] = {
  adapter: "sqlite3",
  database: "test.sqlite3",
  pool: 5,
  timeout: 5000,
}
ActiveRecord::Base.establish_connection :profile

ActiveRecord::Schema.define do
  create_table :users, force: true do |t|
    t.column :created_at, :datetime
    t.column :updated_at, :datetime
  end
end

class User < ActiveRecord::Base; end
100.times { User.create }

Stackviz.profile do
  User.all.to_a
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stackviz-0.0.2 example/ar_profile.rb
stackviz-0.0.1 example/ar_profile.rb