Skip to content

Instantly share code, notes, and snippets.

@kstevens715
Created May 23, 2017 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kstevens715/9f944c555f0a55a9fcb2f2c3cba7d039 to your computer and use it in GitHub Desktop.
Save kstevens715/9f944c555f0a55a9fcb2f2c3cba7d039 to your computer and use it in GitHub Desktop.
require 'benchmark'
class Lots
def run
time = Benchmark.realtime do
10_000.times do |n|
n = n.to_s
puts n
l = GlobalLookup.new(identifier: n, name: n)
l.type = 'TempTest2'
l.save(validate: false)
end
end
puts "Time: #{time}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment