KunBetter / ABTest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ABTest

 import (
 	"fmt"
 	"github.com/KunBetter/ABTest/core"
 	"io/ioutil"
 )
 
 func main() {
 	ab := &core.ABTest{}
 	ab.Init()
 
 	buf, err := ioutil.ReadFile("ABExpConfig.json")
 	if err != nil {
 		fmt.Print(err)
 		return
 	}
 
 	ab.LoadConfig([]string{string(buf)})
 
 	reqMap := make(map[string]string)
 	tagMap := ab.Distribute(reqMap)
 
 	fmt.Println(tagMap)
 }

Next Plan

  • Experimental variables matching supports multiple operators.
  • Support ‰ traffic experiment.

About

License:Apache License 2.0


Languages

Language:Go 100.0%