Start taxonomy term admin list page performance test
Closes #3476439
Merge request reports
Activity
44 45 /** 46 * Logs vocabulary admin page tracing data with a hot cache. 47 * 48 * Hot here means that all possible caches are warmed. 49 */ 50 protected function testHotCache(): void { 51 // Request the page twice so that asset aggregates are definitely cached in 52 // the browser cache. 53 $this->drupalGet('admin/structure/taxonomy/manage/tags/overview'); 54 $this->drupalGet('admin/structure/taxonomy/manage/tags/overview'); 55 56 $performance_data = $this->collectPerformanceData(function () { 57 $this->drupalGet('admin/structure/taxonomy/manage/tags/overview'); 58 }, 'umamiVocabularyAdminPageHotCache'); 59 $this->assertSession()->pageTextContains('Baked'); - Comment on lines +56 to +59
It looks like we are not logged in when doing the request. This is probably measuring the 403 page right now. Not sure why the word "Baked" appears in there.
Maybe we can check that the actual term overview is visible on the page? E.g. by checking the if the element with XPath
//table[@id="taxonomy"]
is present? It looks like we are not logged in when doing the request. This is probably measuring the 403 page right now. Not sure why the word "Baked" appears in there.
You are totally right
umami is listing terms on every page, that is why it was passing.
I'll change this, and also add some extra coverage.
changed this line in version 5 of the diff
added 1 commit
- 2aef88e1 - Add a cool cache case for vocabulary admin performance test
added 168 commits
-
82584851...1afb8711 - 159 commits from branch
project:11.x
- 4eb53daf - Start taxonomy term admin list page performance test
- 47253f41 - Remove unused use statement
-
c9ea8aa8 - Actually look for things at the right place
- 19e42ab7 - Make linter happy
- 67ba173e - Do not use the umami block with tags vocabulary terms as a block in the footer
- 8b4de15d - Unify the approach to match the term
- caa8b2db - Add cache bins clear to PerformanceTestTrait
- 6bc2b331 - Add a cool cache case for vocabulary admin performance test
- 90224250 - Resolved PHPStan errors
Toggle commit list-
82584851...1afb8711 - 159 commits from branch
added 133 commits
-
90224250...69dc12e1 - 123 commits from branch
project:11.x
- e12565b8 - Start taxonomy term admin list page performance test
- f33737b5 - Remove unused use statement
-
77fcefd8 - Actually look for things at the right place
- 8d3e898c - Make linter happy
- 99675d72 - Do not use the umami block with tags vocabulary terms as a block in the footer
- 9f5a724c - Unify the approach to match the term
- edbdde02 - Add cache bins clear to PerformanceTestTrait
- d52475e0 - Add a cool cache case for vocabulary admin performance test
- 7ccf71e8 - Resolved PHPStan errors
- d231d49f - Issue #3476439: Update cache count to fix pipeline failure
Toggle commit list-
90224250...69dc12e1 - 123 commits from branch
added 209 commits
-
d231d49f...0be56730 - 199 commits from branch
project:11.x
- 4610ba3c - Start taxonomy term admin list page performance test
- 9832c11c - Remove unused use statement
-
b1115f00 - Actually look for things at the right place
- 3e123a7a - Make linter happy
- 617e15c7 - Do not use the umami block with tags vocabulary terms as a block in the footer
- 7a01b0d1 - Unify the approach to match the term
- 130facaa - Add cache bins clear to PerformanceTestTrait
- d1f85749 - Add a cool cache case for vocabulary admin performance test
- 5aaf9c82 - Resolved PHPStan errors
- 2aceabd7 - Issue #3476439: Update cache count to fix pipeline failure
Toggle commit list-
d231d49f...0be56730 - 199 commits from branch
added 15 commits
-
2aceabd7...54c4637e - 5 commits from branch
project:11.x
- 1470cf19 - Start taxonomy term admin list page performance test
- c8680374 - Remove unused use statement
-
8d0fc7a0 - Actually look for things at the right place
- 5b26390d - Make linter happy
- d1aa77e5 - Do not use the umami block with tags vocabulary terms as a block in the footer
- eb115d6d - Unify the approach to match the term
- e9d5100a - Add cache bins clear to PerformanceTestTrait
- c635090b - Add a cool cache case for vocabulary admin performance test
- 998a4fcf - Resolved PHPStan errors
- be4dec99 - Issue #3476439: Update cache count to fix pipeline failure
Toggle commit list-
2aceabd7...54c4637e - 5 commits from branch
681 682 ]; 682 683 } 683 684 685 /** changed this line in version 15 of the diff
added 77 commits
-
c752ea55...d1a4f6e0 - 66 commits from branch
project:11.x
- 6c6c8923 - 1 earlier commit
- 8751a972 - Remove unused use statement
-
f48be8f4 - Actually look for things at the right place
- 29ca94f6 - Make linter happy
- 402341a6 - Do not use the umami block with tags vocabulary terms as a block in the footer
- cac28a6d - Unify the approach to match the term
- 3ded9968 - Add cache bins clear to PerformanceTestTrait
- 38d0fc63 - Add a cool cache case for vocabulary admin performance test
- a0d463e3 - Resolved PHPStan errors
- 2f2fcbd5 - Issue #3476439: Update cache count to fix pipeline failure
- 40d9c08c - Addressed feedback for assertMetrics
Toggle commit list-
c752ea55...d1a4f6e0 - 66 commits from branch
added 41 commits
-
40d9c08c...f5a836d5 - 29 commits from branch
project:11.x
- f5a836d5...0ffca9de - 2 earlier commits
-
7abb7e2b - Actually look for things at the right place
- e890a010 - Make linter happy
- 05cc9e2f - Do not use the umami block with tags vocabulary terms as a block in the footer
- ae849e1a - Unify the approach to match the term
- 255575ea - Add cache bins clear to PerformanceTestTrait
- b19b43b2 - Add a cool cache case for vocabulary admin performance test
- d7d00086 - Resolved PHPStan errors
- 285853c4 - Issue #3476439: Update cache count to fix pipeline failure
- 83f4ec13 - Addressed feedback for assertMetrics
- beac7274 - Removed clearCaches method.
Toggle commit list-
40d9c08c...f5a836d5 - 29 commits from branch
1 <?php 2 3 declare(strict_types=1); 4 5 namespace Drupal\Tests\demo_umami\FunctionalJavascript; 6 7 use Drupal\block\Entity\Block; 8 use Drupal\Core\Cache\Cache; 9 use Drupal\FunctionalJavascriptTests\PerformanceTestBase; 10 11 /** 12 * Tests demo_umami profile performance on vocabulary admin page. 13 * 14 * @group OpenTelemetry This doesn't need to be added to the OpenTelemetry group, that determines what powers the dashboard at https://gander.tag1.io/
39 } 40 41 /** 42 * Test vocabulary admin page performance with various cache permutations. 43 */ 44 public function testPerformance(): void { 45 $this->testColdCache(); 46 $this->testHotCache(); 47 $this->testCoolCache(); 48 } 49 50 /** 51 * Logs vocabulary admin page tracing data with a cold cache. 52 */ 53 protected function testColdCache(): void { 54 // @todo Chromedriver doesn't collect tracing performance logs for the very 44 public function testPerformance(): void { 45 $this->testColdCache(); 46 $this->testHotCache(); 47 $this->testCoolCache(); 48 } 49 50 /** 51 * Logs vocabulary admin page tracing data with a cold cache. 52 */ 53 protected function testColdCache(): void { 54 // @todo Chromedriver doesn't collect tracing performance logs for the very 55 // first request in a test, so warm it up. 56 // https://www.drupal.org/project/drupal/issues/3379750 57 $this->drupalGet('user/login'); 58 $this->rebuildAll(); 59 $this->collectPerformanceData(function () { 92 /** 93 * Logs vocabulary admin page tracing data with a cool cache. 94 * 95 * Cool here means that 'global' site caches are warm but anything 96 * specific to the route or path is cold. 97 */ 98 protected function testCoolCache(): void { 99 // Visit a page without the tags terms loaded. 100 $this->drupalGet('user/login'); 101 $this->clearCaches(); 102 // Now visit it post cache rebuild to warm non-route-specific 103 // caches. 104 $this->drupalGet('user/login'); 105 $this->collectPerformanceData(function () { 106 $this->drupalGet('admin/structure/taxonomy/manage/tags/overview'); 107 }, 'umamiVocabularyAdminPageCoolCache'); 66 * Logs vocabulary admin page tracing data with a hot cache. 67 * 68 * Hot here means that all possible caches are warmed. 69 */ 70 protected function testHotCache(): void { 71 // Request the page twice so that asset aggregates are definitely cached in 72 // the browser cache. 73 $this->drupalGet('admin/structure/taxonomy/manage/tags/overview'); 74 $this->drupalGet('admin/structure/taxonomy/manage/tags/overview'); 75 76 $performance_data = $this->collectPerformanceData(function () { 77 $this->drupalGet('admin/structure/taxonomy/manage/tags/overview'); 78 }, 'umamiVocabularyAdminPageHotCache'); 79 80 $expected = [ 81 'queryCount' => 9, changed this line in version 19 of the diff
added 402 commits
-
279cbfad...a464b59b - 388 commits from branch
project:11.x
- a464b59b...39e35b84 - 4 earlier commits
- d3ac14d3 - Do not use the umami block with tags vocabulary terms as a block in the footer
- a432e8d6 - Unify the approach to match the term
- 4fe29b33 - Add cache bins clear to PerformanceTestTrait
- 7e4facf0 - Add a cool cache case for vocabulary admin performance test
- ae2fffd2 - Resolved PHPStan errors
- ecb36077 - Issue #3476439: Update cache count to fix pipeline failure
- 8b38bce3 - Addressed feedback for assertMetrics
- 9de94db3 - Removed clearCaches method.
- 8cbabe59 - Removed clearCaches method.
- e54f7b7f - Added clearCaches method.
Toggle commit list-
279cbfad...a464b59b - 388 commits from branch