MediaWikiFarm static analysis
(explanation below - explications ci-dessous)
Time ↧ Monoversion / Multiversion |
Properties | Files | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
farmDir | configDir | codeDir | cacheDir | params | farmConfig | variables | configuration | farms.yml | variable.yml | config.yml | versions.yml | deployments.php | (cache) versions.php | (cache) config.php | (cache) LocalSettings.php | main.php | ||||||||||
'EntryPoint' | 'ExtensionRegistry' | 'variables' | 'coreconfig' | 'config' | Other | '$CODE' | '$VERSION' | Other | 'settings' / 'arrays' | 'extensions' / 'skins' | 'execFiles' | |||||||||||||||
Existence | load
|
- | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
↳ __construct
|
set | set | set | set | set | set | set | read | set | set | read | read | set | - | - | - | - | - | - | - | - | read | - | - | - | |
| ↳ selectFarm
|
- | read | - | - | - | - | - | set | - | - | - | - | - | - | - | - | read | - | - | - | - | - | - | - | - | |
↳ checkExistence
|
- | - | - | read | - | - | - | read | read | - | read | read | read | - | - | - | - | - | - | - | - | set | - | - | - | |
| ↳ checkHostVariables
|
- | read | read | - | - | - | read | set | - | - | - | set | read | - | - | - | - | read | - | - | - | - | - | - | - | |
| ↳ setVersion
|
- | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
| ↳ setOtherVariables
|
- | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
↳ getConfigFile
|
read | - | - | read | - | - | - | - | - | - | - | read | - | - | - | - | - | - | - | - | - | - | - | - | - | |
setVariable
|
- | - | - | - | - | - | - | - | - | read | - | - | set | - | - | - | - | - | - | - | - | - | - | - | - | |
updateVersionAfterMaintenance
|
- | - | - | - | - | - | - | - | - | - | - | read | - | - | - | - | - | - | - | - | - | - | - | - | - | |
updateVersion
|
- | - | - | - | - | - | - | - | - | - | - | - | read | - | - | - | - | - | - | - | - | - | - | - | - | |
Configuration | loadMediaWikiConfig
|
read | - | read | - | - | read | - | - | - | - | - | - | - | read | read | read | - | - | - | - | - | - | - | - | - |
↳ getMediaWikiConfig
|
- | - | - | read | - | - | - | - | - | - | - | read | - | set | set | set | - | - | - | - | - | - | set | set | - | |
↳ populateSettings
|
- | read | - | - | - | - | - | - | read | - | - | - | read | set | set | set | - | - | read | - | - | - | - | - | - | |
↳ extractSkinsAndExtensions
|
- | - | - | - | - | set | - | - | - | - | - | - | - | set | set | - | - | - | - | - | - | - | - | - | - | |
| ↳ detectLoadingMechanism
|
- | - | - | - | - | read | - | - | - | - | read | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
↳ createLocalSettings
|
read | - | read | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
Utility | isLocalSettingsFresh
|
- | read | - | read | - | - | - | - | read | - | - | read | - | - | - | - | - | - | - | - | - | - | - | - | - |
replaceVariable
|
- | - | - | - | - | - | - | - | - | - | read | read | read | - | - | - | - | - | - | - | - | - | - | - | - | |
readFile
|
- | - | - | read | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
cacheFile
|
- | - | - | read | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | |
(MediaWiki) | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | read | - |
Explanations (English)
This is a hand-made matrix describing what function read or modify what internal data for the software MediaWikiFarm, a MediaWiki "extension" to manage MediaWiki farms of wikis.
This represents the class MediaWikiFarm, which is the main class containing almost all logic. Each row is a method (roughly sorted by chronological order in a typical run) and each column is a class property (all are protected). In each cell, there is either:
- read: the property is (only) read in the method;
- set: the property is set in the method (and possibly read);
- -: the property is neither read or set in the method.
In my previous games works on static analysis, I created the call graph with an external software. But, to be more exact, this call graph is only an overapproximation since the exact (dynamic) call graph is a subset of this one: in a run, possibly some paths are not executed since it depends on the context.
Here, this is the "data graph", and there are different contexts: on the top left, you can choose the various main contexts in which the software can run. This depends mainly from the environment and the configuration, and the possibilities are only the main ones.
The main result coming from this representation is: "the cache drastically reduces the processing". In fact this is not a surprise, it was designed for it, but such a sparse matrix is encouraging and help to visualise the inter-relations. When benchmarking the software, a no-cache run takes 10-15 milliseconds, and a with-cache run takes 85 microseconds (roughly 130 times less).