Skip to content

Reduce extreme network usage for files tests

Grant Young requested to merge gy-file-test-fixes into master

Closes #336 (closed)

Updates the api_v4_projects_repository_files_file and api_v4_projects_repository_files_file_raw to substantially reduce their extreme network usage. At their current scale they're heavily impacted by network speed that in turn is showing as failures on customer networks that are slower than our best in class GCP connections.

Update addresses this in two ways:

  • api_v4_projects_repository_files_file - Updated to make a HEAD call instead of a GET to get the file details but not the content itself as this endpoint is more for the details.
  • api_v4_projects_repository_files_file_raw - Switched to use a smaller file, around 100kb. From what we've seen on other networks it's typical download rate of 92 MB/s is comfortably achievable on most. We still want to test file downloads with this one as the endpoint is specifically to get the file contents.

Before:

█ Results summary

* Environment:                50k
* Environment Version:        12.8.6-ee `5b0bcf2717b`
* Option:                     60s_1000rps
* Date:                       2020-09-28
* Run Time:                   2m 30.19s (Start: 13:10:41 UTC, End: 13:13:11 UTC)
* GPT Version:                v2.1.1

❯ Overall Results Score: 94.52%

NAME                                      | RPS    | RPS RESULT           | TTFB AVG | TTFB P90          | REQ STATUS     | RESULT
------------------------------------------|--------|----------------------|----------|-------------------|----------------|----------------
api_v4_projects_repository_files_file     | 1000/s | 903.07/s (>800.00/s) | 175.94ms | 235.64ms (<500ms) | 99.99% (>95%)  | Passed
api_v4_projects_repository_files_file_raw | 1000/s | 987.25/s (>800.00/s) | 108.95ms | 140.41ms (<500ms) | 100.00% (>95%) | Passed

    █ API - Project Repository File
    data_received..............: 48 GB  790 MB/s

    █ API - Project Repository File Raw
    data_received..............: 39 GB   648 MB/s

After:

█ Results summary

* Environment:                50k
* Environment Version:        12.8.6-ee `5b0bcf2717b`
* Option:                     60s_1000rps
* Date:                       2020-09-28
* Run Time:                   2m 30.57s (Start: 14:20:18 UTC, End: 14:22:49 UTC)
* GPT Version:                v2.1.1

❯ Overall Results Score: 99.03%

NAME                                      | RPS    | RPS RESULT           | TTFB AVG | TTFB P90          | REQ STATUS     | RESULT
------------------------------------------|--------|----------------------|----------|-------------------|----------------|----------------
api_v4_projects_repository_files_file     | 1000/s | 988.56/s (>800.00/s) | 94.67ms  | 118.82ms (<500ms) | 100.00% (>95%) | Passed
api_v4_projects_repository_files_file_raw | 1000/s | 991.89/s (>800.00/s) | 88.48ms  | 97.72ms (<500ms)  | 100.00% (>95%) | Passed

    █ API - Project Repository File
    data_received..............: 48 MB   791 kB/s

    █ API - Project Repository File Raw
    data_received..............: 5.5 GB  92 MB/s

Will be released as 2.1.2.

Edited by Grant Young

Merge request reports