Sha256: b9251713de42c0c06b5c7675bf0c2849e62f892d524d8738b2913de10d23f8ad

Contents?: true

Size: 716 Bytes

Versions: 5

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

require "bundler/setup"
require "convenient_service"
require "stackprof"

class Service
  include ConvenientService::Standard::Config
end

Service.commit_config!

##
# Quotes:
# - stackprof will tell you what is impeding your progress.
# - The assumption is the more times something shows up in the sample the more time it is taking.
#
# Docs:
# - https://www.johnnunemaker.com/how-to-benchmark-your-ruby-gem
# - https://github.com/tmm1/stackprof
#
profile = StackProf.run(mode: :wall, interval: 1_000) do
  2_000_000.times { Service.has_committed_config? }
end

result = StackProf::Report.new(profile)
puts
result.print_text
puts "\n\n\n"
result.print_method(/has_committed_config?/)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convenient_service-0.17.0 benchmark/has_committed_config/profile.rb
convenient_service-0.16.0 benchmark/has_committed_config/profile.rb
convenient_service-0.15.0 benchmark/has_committed_config/profile.rb
convenient_service-0.14.0 benchmark/has_committed_config/profile.rb
convenient_service-0.13.0 benchmark/has_committed_config/profile.rb