Last active
August 11, 2017 10:14
-
-
Save phuedx/d580f01c501d207398828b717bf9870b to your computer and use it in GitHub Desktop.
MediaWiki experiment session generator!!1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
// --- | |
// EXPERIMENT DEFINITION | |
// --- | |
const experiment = { | |
enabled: true, | |
name: 'ext.Popups.instrumentation.eventLogging', | |
buckets: { | |
control: 1 - 0.001, | |
A: 0.001 | |
} | |
} | |
const ITERATIONS = 1000000 | |
const LIMIT = 10 | |
for (let i = j = 0; i < ITERATIONS, j < LIMIT; ++i) { | |
if (mw.experiments.getBucket(experiment, i.toString()) === 'A') { | |
console.log(`mw.storage.session.set('mwuser-sessionId', ${i})`) | |
++j | |
} | |
} | |
}()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment