function OpenTelemetryAuthenticatedPerformanceTest::testNodePageAdministrator
Logs node page performance with an administrator.
File
-
core/
profiles/ demo_umami/ tests/ src/ FunctionalJavascript/ OpenTelemetryAuthenticatedPerformanceTest.php, line 82
Class
- OpenTelemetryAuthenticatedPerformanceTest
- Tests demo_umami profile performance.
Namespace
Drupal\Tests\demo_umami\FunctionalJavascriptCode
public function testNodePageAdministrator() : void {
$user = $this->drupalCreateUser([], NULL, TRUE);
$this->drupalLogin($user);
sleep(2);
$this->drupalGet('node/1');
sleep(2);
$this->drupalGet('node/1');
sleep(2);
$this->clearCaches();
$performance_data = $this->collectPerformanceData(function () {
$this->drupalGet('node/1');
}, 'administratorNodePage');
$expected = [
'QueryCount' => 543,
'CacheGetCount' => 565,
'CacheGetCountByBin' => [
'config' => 221,
'bootstrap' => 23,
'discovery' => 113,
'data' => 71,
'dynamic_page_cache' => 2,
'default' => 45,
'entity' => 23,
'render' => 39,
'menu' => 28,
],
'CacheSetCount' => 474,
'CacheDeleteCount' => 0,
'CacheTagInvalidationCount' => 0,
'CacheTagLookupQueryCount' => 47,
'ScriptCount' => 3,
'ScriptBytes' => 263500,
'StylesheetCount' => 6,
'StylesheetBytes' => 106000,
];
$this->assertMetrics($expected, $performance_data);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.