MCPcopy Index your code
hub / github.com/github/docs / bucket

Function bucket

components/lib/experiment.ts:9–13  ·  view source on GitHub ↗
(test: string)

Source from the content-addressed store, hash-verified

7const CONTROL = 'CONTROL'
8
9export function bucket(test: string) {
10 const id = getUserEventsId()
11 const hash = murmur(test).hash(id).result()
12 return hash % 2 ? TREATMENT : CONTROL
13}
14
15export function sendSuccess(test: string) {
16 return sendEvent({

Callers 1

sendSuccessFunction · 0.85

Calls 1

getUserEventsIdFunction · 0.90

Tested by

no test coverage detected