Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions benchmarks/activerecord/benchmark.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "harness"
require "securerandom"

Dir.chdir __dir__
use_gemfile
Expand All @@ -23,10 +22,10 @@
class Post < ActiveRecord::Base; end

50000.times {
Post.create!(title: SecureRandom.alphanumeric(30),
type_name: SecureRandom.alphanumeric(10),
key: SecureRandom.alphanumeric(10),
body: SecureRandom.alphanumeric(100),
Post.create!(title: Random.alphanumeric(30),
type_name: Random.alphanumeric(10),
key: Random.alphanumeric(10),
body: Random.alphanumeric(100),
upvotes: rand(30),
author_id: rand(30))
}
Expand Down