function OpenTelemetryPerformanceTest::doTestFrontAndRecipesPagesAuthenticated
Checks the front and recipe page asset requests as an authenticated user.
File
-
core/
profiles/ demo_umami/ tests/ src/ FunctionalJavascript/ OpenTelemetryPerformanceTest.php, line 575
Class
- OpenTelemetryPerformanceTest
- Tests demo_umami profile performance.
Namespace
Drupal\Tests\demo_umami\FunctionalJavascriptCode
protected function doTestFrontAndRecipesPagesAuthenticated() : void {
$user = $this->createUser();
$this->drupalLogin($user);
sleep(2);
$performance_data = $this->collectPerformanceData(function () {
$this->doRequests();
}, 'umamiFrontAndRecipePagesAuthenticated');
$expected = [
'ScriptCount' => 6,
'ScriptBytes' => 73750,
'StylesheetCount' => 10,
'StylesheetBytes' => 55581,
];
$this->assertMetrics($expected, $performance_data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.