Sha256: f39c8045980532a91cf64f38d6b7502eeda43eed2f39fcc496e351bead2e67c6

Contents?: true

Size: 383 Bytes

Versions: 9

Compression:

Stored size: 383 Bytes

Contents

# frozen_string_literal: true

require 'benchmark'

NAMES_COUNT = 10_000

def run(name)
  Benchmark.bm do |rep|
    rep.report("generating #{NAMES_COUNT} names (#{name})") do
      mod = name == 'ffaker' ? FFaker : Faker
      NAMES_COUNT.times { mod::Name.name }
    end
  end
end

%w[faker ffaker].each do |gem_name|
  require gem_name

  fork { run(gem_name) }
  Process.wait
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ffaker-2.23.0 scripts/benchmark.rb
ffaker-2.22.0 scripts/benchmark.rb
ffaker-2.21.0 scripts/benchmark.rb
ffaker-2.20.0 scripts/benchmark.rb
ffaker-2.19.0 scripts/benchmark.rb
ffaker-2.18.0 scripts/benchmark.rb
ffaker-2.17.0 scripts/benchmark.rb
ffaker-2.16.0 scripts/benchmark.rb
ffaker-2.15.0 scripts/benchmark.rb