-
Notifications
You must be signed in to change notification settings - Fork 19
feat(decision): Adds composite experiment bucketer that targets and buckets #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
"github.com/twmb/murmur3" | ||
) | ||
|
||
var logger = logging.GetLogger("ExperimentBucketer") | ||
var maxHashValue = float32(math.Pow(2, 32)) | ||
|
||
// DefaultHashSeed is the hash seed to use for murmurhash | ||
const DefaultHashSeed = 1 | ||
const maxTrafficValue = 10000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. Technically this is maxBucketValue
"github.com/twmb/murmur3" | ||
) | ||
|
||
var logger = logging.GetLogger("ExperimentBucketer") | ||
var maxHashValue = float32(math.Pow(2, 32)) | ||
|
||
// DefaultHashSeed is the hash seed to use for murmurhash | ||
const DefaultHashSeed = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. Curious about the syntax here. This name begins with capital letter and the next name begins with small letter. Are we adhering to the standards described here: https://golang.org/doc/effective_go.html#names?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, capitalized means we are making it an exported value in this package. I made it public because we reference it from the experiment_bucketer_service
which uses it to create an instance of the MurmurhashBucketer
. We could just not take in the hash seed in that factory method and default it to this constant. I have no strong opinions about it.
bucketValue := b.generateBucketValue(bucketKey) | ||
// logger.Info() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left from debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah
Summary
MurmurhashBucketer
Tests