Skip to content

Commit

Permalink
Benchmark AR features
Browse files Browse the repository at this point in the history
  • Loading branch information
bkeepers committed Feb 17, 2024
1 parent 573c89b commit 89334ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions benchmark/active_record_adapter_ips.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@

flipper = Flipper.new(Flipper::Adapters::ActiveRecord.new)

2000.times do |i|
flipper.enable_actor :foo, Flipper::Actor.new("User;#{i}")
10.times do |n|
2000.times do |i|
flipper.enable_actor 'feature' + n.to_s, Flipper::Actor.new("User;#{i}")
end
end

Benchmark.ips do |x|
x.report("get_all") { flipper.preload_all }
x.report("features") { flipper.features }
end

0 comments on commit 89334ac

Please sign in to comment.