Sha256: da07b1bde65b327109f065dcac3692f47499d37080e8d561b82c2af7a7dc4c23

Contents?: true

Size: 496 Bytes

Versions: 5

Compression:

Stored size: 496 Bytes

Contents

#! /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
count = (ARGV[0] || 100).to_i
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

result = RubyProf.stop
printer = RubyProf::FlatPrinter.new(result)
printer.print(STDOUT)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gman-7.0.2 script/profile
gman-7.0.1 script/profile
gman-7.0.0 script/profile
gman-6.0.1 script/profile
gman-6.0.0 script/profile