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