script/profile in gman-5.0.9 vs script/profile in gman-6.0.0
- old
+ new
@@ -1,12 +1,15 @@
#! /usr/bin/env ruby
require 'ruby-prof'
require './lib/gman'
-# Pick N random domains directly, without pre-loading the Gman list for an accurate benchmark
+# Pick N random domains directly,
+# without pre-loading the Gman list for an accurate benchmark
count = (ARGV[0] || 100).to_i
-domains = File.readlines("./config/domains.txt").select { |l| l =~ /^[a-z0-9]/i }.sample(count)
+domains = File.readlines('./config/domains.txt')
+domains = domains.select { |l| l =~ /^[a-z0-9]/i }
+domains = domains.sample(count)
RubyProf.start
domains.each do |domain|
Gman.new("foo@bar.#{domain}").valid?
end