fetlife / rollout

Feature flippers.
MIT License
2.89k stars 211 forks source link

check current rollout percentage? #134

Closed mattsly closed 6 years ago

mattsly commented 6 years ago

Is there a way to check what % of users have a given feature flag?

I haven't been able to figure out how to do that.

ErebusBat commented 6 years ago

@mattsly have you tried this?

[9] pry(main)> $rollout.get :my_feature
=> #<Rollout::Feature:0x00007fd14e4545a8 @data={}, @groups=[], @name=:my_feature, @options={}, @percentage=0, @users=[]>
[10] pry(main)> $rollout.activate_percentage :my_feature, 50
=> "OK"
[11] pry(main)> $rollout.get :my_feature
=> #<Rollout::Feature:0x00007fd14cc527c0 @data={}, @groups=[], @name=:my_feature, @options={}, @percentage=50.0, @users=[]>
mattsly commented 6 years ago

Awesome - yup that does the trick thanks!!