Displaying 1 result from an estimated 1 matches for "some_randomly_generated_value".
2006 Aug 18
0
ActiveRecord Benchmarking
...quot;mysql",
:socket => "/var/lib/mysql/mysql.sock",
:username => "..user..",
:password => "..pwd..",
:database => "..db.."
)
def self.add_random_entry()
DBTable.new { |entry|
entry.column1 = ..some_randomly_generated_value..
entry.column2 = ..some_randomly_generated_value..
..other columns..
entry.save
end
end
Benchmark.bm do |reporter|
reporter.report { 1000.times do
DBTable.add_new_random
end
}
end...