Problem/Motivation
When performance_test module is enabled, it records every request and aggregates it into a single key value entry.
The impact of that is fairly minimal in regular perfomance test but even then, performance tests do many requests that explicitly should not be recorded, like he initial warm up requests that are common to all of them.
It's especially problematic when using it with \weitzman\DrupalTestTraits\ExistingSitePerformanceBase because that doesn't install it automatically, so you install it, then run performance tests, then forget it, and a few days later, you're wondering why every request takes 15s (this of course has never happened to me, and especially not multiple times)
Steps to reproduce
Proposed resolution
In \Drupal\Tests\PerformanceTestTrait::collectPerformanceData, set some kind of flag so that the site-being-tested knows that it should now record. of course the question is what exactly. anything in the database would result in an extra query. But it could still record in-memory and then check the flag to just skip the write?
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3635035
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
shank115 commentedComment #5
smustgrave commentedCan this be re-looked at. Know we already talked the AI policy and all that's been addressed but not sure the agent decision to use a try/finally here especially in the first file it was able to explicitly check for performance_test. Think this needs some comments.
Comment #6
catchWith DTT, I think we should move the installation and uninstallation to ::setUp() and ::tearDown() in the DTT performance test class.