function OpenTelemetryNodePagePerformanceTest::testNodePageCoolCache

Same name in other branches
  1. 10 core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php \Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryNodePagePerformanceTest::testNodePageCoolCache()

Logs node/1 tracing data with a cool cache.

Cool here means that 'global' site caches are warm but anything specific to the route or path is cold.

1 call to OpenTelemetryNodePagePerformanceTest::testNodePageCoolCache()
OpenTelemetryNodePagePerformanceTest::testNodePage in core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php
Test canonical node page performance with various cache permutations.

File

core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryNodePagePerformanceTest.php, line 87

Class

OpenTelemetryNodePagePerformanceTest
Tests demo_umami profile performance.

Namespace

Drupal\Tests\demo_umami\FunctionalJavascript

Code

protected function testNodePageCoolCache() : void {
    // First of all visit the node page to ensure the image style exists.
    $this->drupalGet('node/1');
    $this->clearCaches();
    // Now visit a non-node page to warm non-route-specific caches.
    $this->drupalGet('user/login');
    $this->collectPerformanceData(function () {
        $this->drupalGet('node/1');
    }, 'umamiNodePageCoolCache');
    $this->assertSession()
        ->pageTextContains('quiche');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.