Problem/Motivation
Frequently, multiple things change at once in the performance metrics and the tests are very slow, so it is very time consuming to fix them.
Steps to reproduce
Build a single array of values, minus the bits we assert by range, then assert that at once.
Before:
1) Drupal\Tests\navigation\FunctionalJavascript\PerformanceTest::testLogin
Asserting CacheGetCount
Failed asserting that 64 is identical to 61.
/var/www/html/core/tests/Drupal/Tests/PerformanceTestTrait.php:672
/var/www/html/core/modules/navigation/tests/src/FunctionalJavascript/PerformanceTest.php:101
After:
Failed asserting that two arrays are identical.
--- Expected
+++ Actual
@@ @@
Array &0 [
'QueryCount' => 4,
- 'CacheGetCount' => 61,
+ 'CacheGetCount' => 64,
'CacheGetCountByBin' => Array &1 [
'config' => 10,
- 'data' => 6,
+ 'data' => 9,
'access_policy' => 1,
'bootstrap' => 6,
'dynamic_page_cache' => 2,
@@ @@
],
'CacheDeleteCount' => 0,
'CacheTagChecksumCount' => 3,
- 'CacheTagIsValidCount' => 31,
+ 'CacheTagIsValidCount' => 34,
'CacheTagInvalidationCount' => 0,
'ScriptCount' => 2,
'StylesheetCount' => 1,
]