Sha256: 9c5c1dbe14fa8a03631e46242988b49802ce9f23484931f0870606531fb3a6ba

Contents?: true

Size: 402 Bytes

Versions: 14

Compression:

Stored size: 402 Bytes

Contents

require 'rubygems'

begin
  require 'ffaker'
rescue LoadError
  begin
    require 'faker'
  rescue LoadError
    puts "You need to install either faker or ffaker to run this."
  else
    puts "Using Faker"
  end
else
  puts "Using Fast Faker"
end

require 'benchmark'

N = 10_000

Benchmark.bm do |rep|
  rep.report("generating #{ N } names") do
    N.times do
      Faker::Name.name
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
ffaker-1.7.0 scripts/benchmark.rb
ffaker-1.6.0 scripts/benchmark.rb
ffaker-1.5.0 scripts/benchmark.rb
ffaker-1.4.0 scripts/benchmark.rb
ffaker-1.3.0 scripts/benchmark.rb
ffaker-1.2.0 scripts/benchmark.rb
ffaker-1.1.0 scripts/benchmark.rb
ffaker-1.0.0 scripts/benchmark.rb
ffaker-0.4.0 scripts/benchmark.rb
ffaker-0.3.7 scripts/benchmark.rb
ffaker-0.3.6 scripts/benchmark.rb
ffaker-0.3.5 scripts/benchmark.rb
ffaker-0.3.4 scripts/benchmark.rb
ffaker-0.3.3 scripts/benchmark.rb