Sha256: d6a9818a84d1062948eba5af0da92cc0abc54240c7bb52350acb0f0cfc6b8209

Contents?: true

Size: 389 Bytes

Versions: 9

Compression:

Stored size: 389 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 == 'ffakertw' ? FFakerTW : Faker
      NAMES_COUNT.times { mod::Name.name }
    end
  end
end

%w[faker ffakerTW].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
ffakerTW-1.8.0 scripts/benchmark.rb
ffakerTW-1.7.0 scripts/benchmark.rb
ffakerTW-1.6.0 scripts/benchmark.rb
ffakerTW-1.5.0 scripts/benchmark.rb
ffakerTW-1.4.0 scripts/benchmark.rb
ffakerTW-1.3.0 scripts/benchmark.rb
ffakerTW-1.2.0 scripts/benchmark.rb
ffakerTW-1.1.0 scripts/benchmark.rb
ffakerTW-0.1.0 scripts/benchmark.rb