Gitaly N+1 Detector Tests

Context: https://gitlab.slack.com/archives/C3ER3TQBT/p1549395473729500

[The Gitaly N+1 detector is] a tool we used during the gitaly migration project to get a grip on the number of gitaly requests made per rails request. The current limit is an arbitrary number that seemed OK at the time. We could make an effort of driving it down.

That effort has begun here: gitaly#1504

The number of gitaly calls made depends on the data in the system (as well as the way the code is written). E.g., more repos/projects/MRs/etc means potentially more calls. Therefore, there's value in running the tests in an environment with more data.

  • We can have a CI job which runs the test with Gitlay N+1 limit lowered. So the steps could be something like this:

On Staging (or in the performance testing environment):

  1. Have lower_n_plus_1_limit flag turned ON - (Hoping this can be done using a feature flag - which we can turn on and off? )
  2. Run the E2E tests - see any failures that happen.
  3. Report the failures - (Update/Create an issue?)
  4. Turn lower_n_plus_1_limit flag OFF.

To do that we'd need to:

Edited by Mark Lapierre