CirrusSearch
Elasticsearch-powered search for MediaWiki
|
Decision making around user testing. More...
Public Member Functions | |
__construct (array $tests, ?string $activeTest, callable $callback) | |
decideTestByTrigger (string $trigger) | |
decideTestByAutoenroll () | |
decideActiveTest (?string $trigger) | |
activateTest (UserTestingStatus $status) | |
If provided status is in an active state enable the related configuration. | |
Static Public Member Functions | |
static | fromConfig (Config $config) |
static | chooseBucket (float $probability, array $buckets) |
static | hexToProbability (string $hash) |
Converts a hex string into a probability between 0 and 1. | |
static | stableUserProbability (string $testName) |
Decision making around user testing.
See docs/user_testing.md for more information.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html
CirrusSearch\UserTestingEngine::__construct | ( | array | $tests, |
?string | $activeTest, | ||
callable | $callback ) |
array | $tests | |
?string | $activeTest | Array key in test to enable autoenroll for, or null for no autoenrollment. |
callable | $callback | Called with the test name, returns a float between 0 and 1 which is uniformly distributed across users and stable for an individual user+testName combination. |
CirrusSearch\UserTestingEngine::activateTest | ( | UserTestingStatus | $status | ) |
If provided status is in an active state enable the related configuration.
UserTestingStatus | $status |
|
static |
float | $probability | A number between 0 and 1 |
string[] | $buckets | List of buckets to choose from. |
|
static |
Converts a hex string into a probability between 0 and 1.
Retains uniform distribution of incoming hash string.
string | $hash |
|
static |
string | $testName |