Loading core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public function testFrontPageCoolCache() { $this->drupalGet('<front>'); $this->rebuildAll(); // Now visit a different page to warm non-route-specific caches. $this->drupalGet('/user/login'); $this->drupalGet('user/login'); $this->collectPerformanceData(function () { $this->drupalGet('<front>'); }, 'umamiFrontPageCoolCache'); Loading core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php +14 −7 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ public function testNodePageColdCache() { $this->drupalGet('user/login'); $this->rebuildAll(); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $this->drupalGet('node/1'); }, 'umamiNodePageColdCache'); $this->assertSession()->pageTextContains('quiche'); } Loading @@ -44,10 +44,17 @@ public function testNodePageHotCache() { // the browser cache. $this->drupalGet('node/1'); $this->drupalGet('node/1'); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $performance_data = $this->collectPerformanceData(function () { $this->drupalGet('node/1'); }, 'umamiNodePageHotCache'); $this->assertSession()->pageTextContains('quiche'); $this->assertSame($performance_data->getQueryCount(), 0); $this->assertSame($performance_data->getCacheGetCount(), 1); $this->assertSame($performance_data->getCacheSetCount(), 0); $this->assertSame($performance_data->getCacheDeleteCount(), 0); $this->assertSame(0, $performance_data->getCacheTagChecksumCount()); $this->assertSame(1, $performance_data->getCacheTagIsValidCount()); } /** Loading @@ -61,9 +68,9 @@ public function testNodePageCoolCache() { $this->drupalGet('node/1'); $this->rebuildAll(); // Now visit a non-node page to warm non-route-specific caches. $this->drupalGet('/user/login'); $this->drupalGet('user/login'); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $this->drupalGet('node/1'); }, 'umamiNodePageCoolCache'); $this->assertSession()->pageTextContains('quiche'); } Loading @@ -79,9 +86,9 @@ public function testNodePageWarmCache() { $this->drupalGet('node/1'); $this->rebuildAll(); // Now visit a different node page to warm non-path-specific caches. $this->drupalGet('/node/2'); $this->drupalGet('node/2'); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $this->drupalGet('node/1'); }, 'umamiNodePageWarmCache'); $this->assertSession()->pageTextContains('quiche'); } Loading Loading
core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryFrontPagePerformanceTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ public function testFrontPageCoolCache() { $this->drupalGet('<front>'); $this->rebuildAll(); // Now visit a different page to warm non-route-specific caches. $this->drupalGet('/user/login'); $this->drupalGet('user/login'); $this->collectPerformanceData(function () { $this->drupalGet('<front>'); }, 'umamiFrontPageCoolCache'); Loading
core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php +14 −7 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ public function testNodePageColdCache() { $this->drupalGet('user/login'); $this->rebuildAll(); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $this->drupalGet('node/1'); }, 'umamiNodePageColdCache'); $this->assertSession()->pageTextContains('quiche'); } Loading @@ -44,10 +44,17 @@ public function testNodePageHotCache() { // the browser cache. $this->drupalGet('node/1'); $this->drupalGet('node/1'); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $performance_data = $this->collectPerformanceData(function () { $this->drupalGet('node/1'); }, 'umamiNodePageHotCache'); $this->assertSession()->pageTextContains('quiche'); $this->assertSame($performance_data->getQueryCount(), 0); $this->assertSame($performance_data->getCacheGetCount(), 1); $this->assertSame($performance_data->getCacheSetCount(), 0); $this->assertSame($performance_data->getCacheDeleteCount(), 0); $this->assertSame(0, $performance_data->getCacheTagChecksumCount()); $this->assertSame(1, $performance_data->getCacheTagIsValidCount()); } /** Loading @@ -61,9 +68,9 @@ public function testNodePageCoolCache() { $this->drupalGet('node/1'); $this->rebuildAll(); // Now visit a non-node page to warm non-route-specific caches. $this->drupalGet('/user/login'); $this->drupalGet('user/login'); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $this->drupalGet('node/1'); }, 'umamiNodePageCoolCache'); $this->assertSession()->pageTextContains('quiche'); } Loading @@ -79,9 +86,9 @@ public function testNodePageWarmCache() { $this->drupalGet('node/1'); $this->rebuildAll(); // Now visit a different node page to warm non-path-specific caches. $this->drupalGet('/node/2'); $this->drupalGet('node/2'); $this->collectPerformanceData(function () { $this->drupalGet('/node/1'); $this->drupalGet('node/1'); }, 'umamiNodePageWarmCache'); $this->assertSession()->pageTextContains('quiche'); } Loading