Skip to content

Instantly share code, notes, and snippets.

@phuedx phuedx/boogy.js
Last active Aug 11, 2017

Embed
What would you like to do?
MediaWiki experiment session generator!!1
(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
You can’t perform that action at this time.