Created
July 1, 2011 14:08
-
-
Save bradland/1058610 to your computer and use it in GitHub Desktop.
Simple timing test for bcrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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