Sha256: 178dd34413cfb31bb82aa36e7400167a319f7499be11122ab77632465b760c92

Contents?: true

Size: 453 Bytes

Versions: 20

Compression:

Stored size: 453 Bytes

Contents

require 'bundler/setup'
require 'flipper'
require 'stackprof'
require 'benchmark/ips'

flipper = Flipper.new(Flipper::Adapters::Memory.new)
feature = flipper.feature(:foo)
actor = Flipper::Actor.new("User;1")

profile = StackProf.run(mode: :wall, interval: 1_000) do
  2_000_000.times do
    feature.enabled?(actor)
  end
end

result = StackProf::Report.new(profile)
puts
result.print_text
puts "\n\n\n"
result.print_method(/Flipper::Feature#enabled?/)

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
flipper-1.3.2 benchmark/enabled_profile.rb
flipper-1.3.1 benchmark/enabled_profile.rb
flipper-1.3.0 benchmark/enabled_profile.rb
flipper-1.3.0.pre benchmark/enabled_profile.rb
flipper-1.2.2 benchmark/enabled_profile.rb
flipper-1.2.1 benchmark/enabled_profile.rb
flipper-1.2.0 benchmark/enabled_profile.rb
flipper-1.1.2 benchmark/enabled_profile.rb
flipper-1.1.1 benchmark/enabled_profile.rb
flipper-1.1.0 benchmark/enabled_profile.rb
flipper-1.0.0 benchmark/enabled_profile.rb
flipper-1.0.0.pre benchmark/enabled_profile.rb
flipper-0.28.3 benchmark/enabled_profile.rb
flipper-0.28.2 benchmark/enabled_profile.rb
flipper-0.28.1 benchmark/enabled_profile.rb
flipper-0.28.0 benchmark/enabled_profile.rb
flipper-0.27.1 benchmark/enabled_profile.rb
flipper-0.27.0 benchmark/enabled_profile.rb
flipper-0.26.2 benchmark/enabled_profile.rb
flipper-0.26.1 benchmark/enabled_profile.rb