function OpenTelemetryPerformanceTest::testNodePageHotCache

Same name and namespace in other branches
  1. 11.x core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryPerformanceTest.php \Drupal\Tests\demo_umami\FunctionalJavascript\OpenTelemetryPerformanceTest::testNodePageHotCache()

Logs node page tracing data with a hot cache.

Hot here means that all possible caches are warmed.

1 call to OpenTelemetryPerformanceTest::testNodePageHotCache()
OpenTelemetryPerformanceTest::testUmamiPerformance in core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryPerformanceTest.php
Test performance of various with various cache permutations.

File

core/profiles/demo_umami/tests/src/FunctionalJavascript/OpenTelemetryPerformanceTest.php, line 74

Class

OpenTelemetryPerformanceTest
Tests demo_umami profile performance.

Namespace

Drupal\Tests\demo_umami\FunctionalJavascript

Code

protected function testNodePageHotCache() : void {
  // Request the page twice so that asset aggregates are definitely cached in
  // the browser cache.
  $this->drupalGet('node/1');
  $this->drupalGet('node/1');
  $performance_data = $this->collectPerformanceData(function () {
    $this->drupalGet('node/1');
  }, 'umamiNodePageHotCache');
  $this->assertSession()
    ->pageTextContains('quiche');
  $this->assertMetricsByName('umamiNodePageHotCache', $performance_data);
}

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