All Projects → travaux-com → VariantRetriever

travaux-com / VariantRetriever

Licence: other
VariantRetriever is a minimalist package for feature flagging

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to VariantRetriever

growthbook
Open Source Feature Flagging and A/B Testing Platform
Stars: ✭ 2,342 (+10082.61%)
Mutual labels:  feature-flags, ab-testing, feature-flagging
Unleash
Unleash is the open source feature toggle service.
Stars: ✭ 4,679 (+20243.48%)
Mutual labels:  feature-flags, variants
python-client
Python SDK client for Split Software
Stars: ✭ 12 (-47.83%)
Mutual labels:  feature-flags, ab-testing
Flagr
Flagr is a feature flagging, A/B testing and dynamic configuration microservice
Stars: ✭ 1,776 (+7621.74%)
Mutual labels:  feature-flags, ab-testing
flagsmith-js-client
Javascript Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 42 (+82.61%)
Mutual labels:  feature-flags, feature-flagging
flagsmith-nodejs-client
Flagsmith Node JS Client. Flagsmith lets you manage features flags across web, mobile and server side applications. Get builds out faster. Control who has access to new features.
Stars: ✭ 13 (-43.48%)
Mutual labels:  feature-flags, feature-flagging
Tweek
Tweek - an open source feature manager
Stars: ✭ 268 (+1065.22%)
Mutual labels:  feature-flags, ab-testing
java-client
Java SDK client for Split Software
Stars: ✭ 20 (-13.04%)
Mutual labels:  feature-flags, ab-testing
flagsmith
Open Source Feature Flagging and Remote Config Service. Host on-prem or use our hosted version at https://flagsmith.com/
Stars: ✭ 2,309 (+9939.13%)
Mutual labels:  feature-flags, feature-flagging
Study
A simple, progressive, client/server AB testing library 📚
Stars: ✭ 293 (+1173.91%)
Mutual labels:  experiment, ab-testing
laboratory
Feature flags for multi-module Kotlin Android projects
Stars: ✭ 71 (+208.7%)
Mutual labels:  feature-flags, ab-testing
iter8
Kubernetes release optimizer
Stars: ✭ 217 (+843.48%)
Mutual labels:  experiment, ab-testing
react-client
React JS SDK client for Split Software
Stars: ✭ 23 (+0%)
Mutual labels:  feature-flags, ab-testing
featurehub
FeatureHub - cloud native feature flags, A/B testing and remote configuration service. Real-time streaming feature updates. Provided with Java, JavaScript, Go, .Net, Android and Flutter SDKs.
Stars: ✭ 136 (+491.3%)
Mutual labels:  feature-flags, feature-flagging
ruby-client
Ruby SDK client for Split Software
Stars: ✭ 22 (-4.35%)
Mutual labels:  feature-flags, ab-testing
flagsmith-java-client
Java Client for Flagsmith. Ship features with confidence using feature flags and remote config. Host yourself or use our hosted version at https://www.flagsmith.com/
Stars: ✭ 16 (-30.43%)
Mutual labels:  feature-flags, feature-flagging
Flipper
🐬 Beautiful, performant feature flags for Ruby.
Stars: ✭ 2,732 (+11778.26%)
Mutual labels:  feature-flags, feature-flagging
php-client
PHP SDK client for Split Software
Stars: ✭ 14 (-39.13%)
Mutual labels:  feature-flags, ab-testing
abba
A/B Testing framework
Stars: ✭ 16 (-30.43%)
Mutual labels:  experiment, ab-testing
ghost
Ghost Framework is an Android post-exploitation framework that exploits the Android Debug Bridge to remotely access an Android device. Ghost Framework gives you the power and convenience of remote Android device administration.
Stars: ✭ 156 (+578.26%)
Mutual labels:  hacktoberfest-accepted

VariantRetriever


VariantRetriever is a minimalist package for feature flagging. It's fast, database free and idempotent library to choose over a set of variants.

Getting Started

First of all, you need to define an Experiment with a name and it variants. Variant requires 2 arguments, a name and a rollout percentage (50% by default). Then create a variant retriever with this experiment and variants, and ask it to retrieve a variant for a resource (in the following code, it's for a user uuid).

$variantRetriever = new VariantRetriever();
$experiment = new Experiment('my-ab-test', ...[new Variant('control1'), new Variant('variant2')]);
$variantRetriever->addExperiment($experiment);

$affectedVariant = $variantRetriever->getVariantForExperiment(new Experiment('my-ab-test'), '77d8a1d5-97ba-42db-a4a7-3b9562f0ff22');

var_dump((string) $affectedVariant); // string(7) "variant2"

Running the Test Suite

VariantRetriever uses Pest PHP as testing framework. Once you have all dependencies installed via composer install, you can run the test suite with:

./vendor/bin/pest

To obtain the code coverage report, you'll need to have xdebug installed. Then, you can run:

./vendor/bin/pest --coverage

And this will give you detailed information about code coverage.

What about speed

VariantRetriever is fast. In our test, we ensure that the retriever is able to get 50 000 variants to randomly generate different identifiables in less than 1 second. Local dev machine can run 500 000 runs in less than a second.

What about randomness

Rows Rollout Rollout Max Rollout difference
1k 50/50 46.5/46.5 3.5%
500k 50/50 49.87/49.87 0.13%
500k 10*10 9.88 0.12%
500k 10/10/80 9.88/9.88/79.92 0.12%
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].