-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Declare modules that are loaded on article views
Tracking bundlesizes on modules that are loaded on page load, allows us to track overall site performance for article views. These budgets are set to null for now, as tracking and enforcing their size is optional per https://www.mediawiki.org/wiki/Performance_budgeting Bug: T360590 Change-Id: I1f47161b3e2c5116a7a1622bed41fba0c44c5f07
- Loading branch information
1 parent
ed2acc5
commit a0ed2c6
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"resourceModule": "wikibase.client.data-bridge.externalModifiers", | ||
"maxSize": null | ||
}, | ||
{ | ||
"resourceModule": "wikibase.client.data-bridge.init", | ||
"maxSize": null | ||
}, | ||
{ | ||
"resourceModule": "wikibase.client.init", | ||
"maxSize": null | ||
}, | ||
{ | ||
"resourceModule": "wikibase.vector.searchClient", | ||
"maxSize": null | ||
} | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare( strict_types = 1 ); | ||
|
||
namespace Wikibase\Lib\Tests; | ||
|
||
use MediaWiki\Tests\Structure\BundleSizeTestBase; | ||
|
||
/** | ||
* Track the size of ResourceLoader modules that repo or client load on page load. | ||
* | ||
* @group Wikibase | ||
* @license GPL-2.0-or-later | ||
* @coversNothing | ||
*/ | ||
class WikibaseBundleSizeTest extends BundleSizeTestBase { | ||
|
||
protected function setUp(): void { | ||
parent::setUp(); | ||
|
||
$this->markTestSkippedIfExtensionNotLoaded( 'WikibaseRepository' ); | ||
$this->markTestSkippedIfExtensionNotLoaded( 'WikibaseClient' ); | ||
} | ||
|
||
/** @inheritDoc */ | ||
public function getBundleSizeConfig(): string { | ||
return dirname( __DIR__, 3 ) . '/bundlesize.config.json'; | ||
} | ||
|
||
} |