File: enabled_ips.rb

package info (click to toggle)
ruby-flipper 0.26.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,288 kB
  • sloc: ruby: 16,377; sh: 61; javascript: 24; makefile: 14
file content (10 lines) | stat: -rw-r--r-- 244 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
require 'bundler/setup'
require 'flipper'
require 'benchmark/ips'

actor = Flipper::Actor.new("User;1")

Benchmark.ips do |x|
  x.report("with actor") { Flipper.enabled?(:foo, actor) }
  x.report("without actor") { Flipper.enabled?(:foo) }
end