WikiLambda
MediaWiki WikiLambda extension
Loading...
Searching...
No Matches
MediaWiki\Extension\WikiLambda\API\ApiPerformTest Class Reference
+ Inheritance diagram for MediaWiki\Extension\WikiLambda\API\ApiPerformTest:
+ Collaboration diagram for MediaWiki\Extension\WikiLambda\API\ApiPerformTest:

Public Member Functions

 __construct ( $query, $moduleName, ZObjectStore $zObjectStore)
 
 execute ()
 
 executeGenerator ( $resultPageSet)
 
 isInternal ()
 Mark as internal.
 
 setLogger (LoggerInterface $logger)
 
 getLogger ()
 
- Public Member Functions inherited from MediaWiki\Extension\WikiLambda\API\WikiLambdaApiBase
 dieWithZError ( $zerror)
 

Static Public Member Functions

static maybeUpdateImplementationRanking ( $functionZid, $functionRevision, $implementationMap, $attachedImplementationZids, $attachedTesterZids)
 Based on tester results contained in $implementationMap, order the implementations of the given function from best-performing to worst-performing (in terms of speed).
 
static getImplementationZids ( $targetFunction)
 For the given function, get Z8K4/implementations and return a list of ZIDs for them.
 
static getTesterZids ( $targetFunction)
 For the given function, get Z8K3/testers and return a list of ZIDs for them.
 

Protected Member Functions

 getAllowedParams ()
 @inheritDoc @codeCoverageIgnore
 
 getExamplesMessages ()
 

Protected Attributes

 $zObjectStore
 
 $orchestrator
 

Member Function Documentation

◆ getExamplesMessages()

MediaWiki\Extension\WikiLambda\API\ApiPerformTest::getExamplesMessages ( )
protected
See also
ApiBase::getExamplesMessages()
Returns
array @codeCoverageIgnore

◆ getImplementationZids()

static MediaWiki\Extension\WikiLambda\API\ApiPerformTest::getImplementationZids ( $targetFunction)
static

For the given function, get Z8K4/implementations and return a list of ZIDs for them.

TODO (T329254): Consider moving into ZFunction

Parameters
ZFunction$targetFunction
Returns
array
Exceptions
ZErrorExceptionfrom ZObjectFactory::create
+ Here is the caller graph for this function:

◆ getTesterZids()

static MediaWiki\Extension\WikiLambda\API\ApiPerformTest::getTesterZids ( $targetFunction)
static

For the given function, get Z8K3/testers and return a list of ZIDs for them.

TODO (T329254): Consider consolidating with getImplementationZids and moving into ZFunction

Parameters
ZFunction$targetFunction
Returns
array
Exceptions
ZErrorExceptionfrom ZObjectFactory::create

◆ isInternal()

MediaWiki\Extension\WikiLambda\API\ApiPerformTest::isInternal ( )

Mark as internal.

This isn't meant to be user-facing, and can change at any time.

Returns
bool

◆ maybeUpdateImplementationRanking()

static MediaWiki\Extension\WikiLambda\API\ApiPerformTest::maybeUpdateImplementationRanking ( $functionZid,
$functionRevision,
$implementationMap,
$attachedImplementationZids,
$attachedTesterZids )
static

Based on tester results contained in $implementationMap, order the implementations of the given function from best-performing to worst-performing (in terms of speed).

If the ordering is significantly different than the previous ordering for this function, instantiate an asynchronous job to update Z8K4/implementations in the function's persistent storage.

TODO (T329138): Consider whether average Cpu usage is good enough to determine the ranking. Should we eliminate implementations that are outliers relative to others on the same test? Should we consider non-CPU time needed to, e.g., retrieve info from Wikidata?

Parameters
string$functionZid
int$functionRevision
array$implementationMapcontains $implementationZid => $testerMap, for each tested implementation. $testerMap contains $testerZid => $testResult for each tester. See ApiPerformTest::run for the structure of $testResult.
array$attachedImplementationZids
array$attachedTesterZids

The documentation for this class was generated from the following file: