function OpenTelemetryPerformanceTest::doTestFrontPageAuthenticatedWarmCache

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::doTestFrontPageAuthenticatedWarmCache()

Logs front page tracing data with an authenticated user and warm cache.

1 call to OpenTelemetryPerformanceTest::doTestFrontPageAuthenticatedWarmCache()
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 199

Class

OpenTelemetryPerformanceTest
Tests demo_umami profile performance.

Namespace

Drupal\Tests\demo_umami\FunctionalJavascript

Code

protected function doTestFrontPageAuthenticatedWarmCache() : void {
  $user = $this->drupalCreateUser();
  $this->drupalLogin($user);
  sleep(2);
  $this->drupalGet('<front>');
  sleep(2);
  $this->drupalGet('<front>');
  sleep(2);
  $this->drupalGet('<front>');
  sleep(2);
  $performance_data = $this->collectPerformanceData(function () {
    $this->drupalGet('<front>');
  }, 'authenticatedFrontPage');
  $this->assertQueriesByName('authenticatedFrontPage', $performance_data->getQueries());
  $this->assertMetricsByName('authenticatedFrontPage', $performance_data);
}

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