承接 graymatterlabs/experiment 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

graymatterlabs/experiment

最新稳定版本:v0.3

Composer 安装命令:

composer require graymatterlabs/experiment

包简介

README 文档

README

Latest Version on Packagist Tests Total Downloads

This package makes no opinions on how you store your experiment data. Bring your own implementation of GrayMatterLabs\Experiment\Contracts\Persistence or use one of the provided implementations.

How you choose to implement your GrayMatterLabs\Experiment\Contracts\Factory will determine how you reference your experiments throughout the code. By default, there is an implementation provided that references experiments by their fully qualified class names.

Similarly, you may choose to and are encouraged to configure your experiments in a dynamic and/or data-backed way by instantiating them with data from any number of storage mechanisms as well as in any shape you see fit.

In general, this package attempts to not strictly enforce opinions as much as possible but rather provide an open-ended framework for A/B testing that minimizes complexity and overhead. You are encouraged to bring your own concrete implementations of the provided interfaces. You can, however, lean into the implementations provided for you.

Installation

You can install the package via composer:

composer require graymatterlabs/experiment:^0.3

Usage

$manager = new Manager($persistence, $factory, $strategy);
$sample = new Sample();

$allocation = $manager->allocate($experiment, $sample);

if (! $allocation->isAllocated()) {
    // unable to allocate
}

if ($allocation->isVariant('TEST')) {
    // execute experimental feature
}

if ($allocation->wasRecentlyAllocated) {
    // the allocation is new
}

Note: Usage of GrayMatterLabs\Experiment\Persistence\SimpleCachePersistence requires you satisfy the Psr\SimpleCache\CacheInterface interface. See graymatterlabs/simple-cache or bring your own implementation.

Testing

composer test

Changelog

Please see the Release Notes for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固