Skip to content

Instantly share code, notes, and snippets.

@bradland
Created July 1, 2011 14:08
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 bradland/1058610 to your computer and use it in GitHub Desktop.
Save bradland/1058610 to your computer and use it in GitHub Desktop.
Simple timing test for bcrypt
#!/usr/bin/env ruby
require 'bcrypt'
def time
start = Time.now
yield
puts "That took #{Time.now - start} seconds"
end
time do
1000.times do
my_password = BCrypt::Password.create("testpass")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment