Commit ec5df31c authored by Grant Young's avatar Grant Young 💬
Browse files

Update target MRs for changes and commits to be more realistic

parent 98570b9e
......@@ -15,7 +15,11 @@ Documentation on how to use the tool can be found in the [`docs/`](/docs/README.
**Note:** These docs are for GPT `v2`. For GPT `v1` please refer to the docs [here](https://gitlab.com/gitlab-org/quality/performance/-/blob/v1-master/README.md).
## GitLab Test Results
## Test Details
To get more detailed information about the current test list that is run by GPT you can refer to the [Current Test Details wiki page](https://gitlab.com/gitlab-org/quality/performance/wikis/current-test-details).
## Test Results
The GitLab Quality team uses this Tool in frequent automated pipelines to continuously measure the performance of GitLab. The results are uploaded to this project's wiki and made available for anyone to see:
......
......@@ -17,7 +17,7 @@ require 'result_writer'
k6_dir = Pathname.new(File.expand_path('../k6', __dir__)).relative_path_from(Dir.pwd)
gpt_version = '2.7.0'
gpt_version = '2.8.0'
puts Rainbow("GitLab Performance Tool (GPT) v#{gpt_version} - Performance test runner for GitLab environments based on k6").color(230, 83, 40)
opts = Optimist.options do
......
......@@ -390,8 +390,9 @@ First you will need to create the [Project Config File](..k6/config/projects). T
"branch_name": "12-1-auto-deploy-20190714"
},
"pipeline_sha": "bca0bc9e5ed1da25aff3d407eddfc0fe1606ec2b",
"mr_commits_iid": "10495",
"mr_commits_iid": "5081",
"mr_discussions_iid": "6958",
"mr_changes_iid": "8785",
"search": {
"projects": ["gitlab", "username", "merge", "remove", "test", "project", "public"],
"issues": ["gitlab", "bot", "push", "repo", "error", "database", "issue"],
......@@ -428,9 +429,10 @@ Details for each of the settings are as follows. You should aim to have each of
* `branch_current_head_sha` - The head commit of the `branch_name` branch.
* `branch_new_head_sha` - Any commit SHA that older then `branch_current_head_sha` on the `branch_name` branch.
* `branch_name` - Existing branch name.
* `mr_commits_iid` - The [iid](https://docs.gitlab.com/ee/api/#id-vs-iid) of a merge request available in the project that has a large number of commits. The size of the MR should be tuned to your environment's requirements.
* `pipeline_sha` - The commit SHA of a pipeline available in the project that has a large number of jobs. The size of the pipeline should be tuned to your environment's requirements.
* `mr_commits_iid` - The [iid](https://docs.gitlab.com/ee/api/#id-vs-iid) of a merge request available in the project that has a large number of commits. The size of the MR should be tuned to your environment's requirements.
* `mr_discussions_iid` - The [iid](https://docs.gitlab.com/ee/api/#id-vs-iid) of a merge request available in the project that has a large number of discussions / comments. The size of the MR discussions should be tuned to your environment's requirements.
* `mr_changes_iid` - The [iid](https://docs.gitlab.com/ee/api/#id-vs-iid) of a merge request available in the project that has a large number of changes. The size of the MR changes should be tuned to your environment's requirements.
* `search` - A list of search terms to used against [Search through GitLab](https://docs.gitlab.com/ee/user/search/) and [GitLab Advanced Search](https://docs.gitlab.com/ee/user/search/advanced_global_search.html) (the latter needs to be configured on the environment specifically). Each item is an array of search words that we use to compose a search term for the specified scope against both the API and Web UI. Currently the ones shown above are supported at this time. Note: for `user` and `milestone` scope we select a random item from the array, for all other scopes we compose a random 3 item search term from their respective arrays.
* `projects` - [Projects Scope](https://docs.gitlab.com/ee/api/search.html#scope-projects) search term array.
* `issues` - [Issues Scope](https://docs.gitlab.com/ee/api/search.html#scope-issues) search term array.
......
......@@ -208,7 +208,7 @@ The recommended way to run the Tool is with our Docker image, [gitlab/gitlab-per
The image will start running the tests when it's called. The full options for running the tool can be seen by getting the help output by running `docker run -it gitlab/gitlab-performance-tool --help`:
```txt
GitLab Performance Tool (GPT) v2.7.0 - Performance test runner for GitLab environments based on k6
GitLab Performance Tool (GPT) v2.8.0 - Performance test runner for GitLab environments based on k6
Documentation: https://gitlab.com/gitlab-org/quality/performance/blob/master/docs/README.md
......@@ -300,7 +300,7 @@ After starting the tool you will see it running each test in order. Once all tes
* Option: 60s_200rps
* Date: 2020-12-02
* Run Time: 1h 9m 11.38s (Start: 10:49:37 UTC, End: 11:58:48 UTC)
* GPT Version: v2.7.0
* GPT Version: v2.8.0
❯ Overall Results Score: 98.13%
......
......@@ -22,8 +22,9 @@
"branch_name": "12-1-auto-deploy-20190714"
},
"pipeline_sha": "bca0bc9e5ed1da25aff3d407eddfc0fe1606ec2b",
"mr_commits_iid": "10495",
"mr_commits_iid": "5081",
"mr_discussions_iid": "6958",
"mr_changes_iid": "8785",
"search": {
"projects": ["gitlab", "username", "merge", "remove", "test", "project", "public"],
"issues": ["gitlab", "bot", "push", "repo", "error", "database", "issue"],
......
......@@ -21,7 +21,7 @@ export let options = {
}
};
export let projects = getLargeProjects(['encoded_path', 'mr_commits_iid']);
export let projects = getLargeProjects(['encoded_path', 'mr_changes_iid']);
export function setup() {
console.log('')
......@@ -35,7 +35,7 @@ export default function() {
let project = selectRandom(projects);
let params = { headers: { "Accept": "application/json", "PRIVATE-TOKEN": `${__ENV.ACCESS_TOKEN}` } };
let res = http.get(`${__ENV.ENVIRONMENT_URL}/api/v4/projects/${project['encoded_path']}/merge_requests/${project['mr_commits_iid']}`, params);
let res = http.get(`${__ENV.ENVIRONMENT_URL}/api/v4/projects/${project['encoded_path']}/merge_requests/${project['mr_changes_iid']}`, params);
/20(0|1)/.test(res.status) ? successRate.add(true) : (successRate.add(false), logError(res));
});
}
......@@ -27,7 +27,7 @@ export let options = {
}
};
export let projects = getLargeProjects(['encoded_path', 'mr_commits_iid']);
export let projects = getLargeProjects(['encoded_path', 'mr_changes_iid']);
export function setup() {
console.log('')
......@@ -41,7 +41,7 @@ export default function() {
let project = selectRandom(projects);
let params = { headers: { "Accept": "application/json", "PRIVATE-TOKEN": `${__ENV.ACCESS_TOKEN}` }, responseType: 'none' };
let res = http.get(`${__ENV.ENVIRONMENT_URL}/api/v4/projects/${project['encoded_path']}/merge_requests/${project['mr_commits_iid']}/changes`, params);
let res = http.get(`${__ENV.ENVIRONMENT_URL}/api/v4/projects/${project['encoded_path']}/merge_requests/${project['mr_changes_iid']}/changes`, params);
/20(0|1)/.test(res.status) ? successRate.add(true) : (successRate.add(false), logError(res));
});
}
......@@ -17,7 +17,7 @@ import { checkProjEndpointDash } from "../../lib/gpt_data_helper_functions.js";
export let thresholds = {
'rps': { '13.2.0': __ENV.WEB_ENDPOINT_THROUGHPUT * 0.4, '13.10.0': __ENV.WEB_ENDPOINT_THROUGHPUT * 0.5, 'latest': __ENV.WEB_ENDPOINT_THROUGHPUT },
'ttfb': { '13.2.0': 5000, '13.10.0': 4000, 'latest': 1000 }
'ttfb': { '13.2.0': 5000, '13.10.0': 4000, 'latest': 1250 }
};
export let endpointCount = 7
export let webProtoRps = adjustRps(__ENV.WEB_ENDPOINT_THROUGHPUT)
......@@ -62,9 +62,9 @@ export default function(data) {
let project = selectRandom(projects);
let responses = http.batch([
["GET", `${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_commits_iid']}/diffs`, null, {tags: {endpoint: 'diffs', controller: 'Projects::MergeRequestsController', action: 'show'}, redirects: 0}],
["GET", `${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_commits_iid']}/diffs_metadata.json?`, null, {tags: {endpoint: 'diffs_metadata.json', controller: 'Projects::MergeRequests::DiffsController', action: 'diffs_metadata.json'}, redirects: 0}],
["GET", `${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_commits_iid']}/diffs_batch.json?w=0&per_page=20&page=1`, null, {tags: {endpoint: 'diffs_batch.json', controller: 'Projects::MergeRequests::DiffsController', action: 'diffs_batch.json'}, redirects: 0}],
["GET", `${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_changes_iid']}/diffs`, null, {tags: {endpoint: 'diffs', controller: 'Projects::MergeRequestsController', action: 'show'}, redirects: 0}],
["GET", `${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_changes_iid']}/diffs_metadata.json?`, null, {tags: {endpoint: 'diffs_metadata.json', controller: 'Projects::MergeRequests::DiffsController', action: 'diffs_metadata.json'}, redirects: 0}],
["GET", `${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_changes_iid']}/diffs_batch.json?w=0&per_page=20&page=1`, null, {tags: {endpoint: 'diffs_batch.json', controller: 'Projects::MergeRequests::DiffsController', action: 'diffs_batch.json'}, redirects: 0}],
]);
responses.forEach(function(res) {
/20(0|1)/.test(res.status) ? successRate.add(true) : (successRate.add(false), logError(res));
......@@ -72,7 +72,7 @@ export default function(data) {
let seqDiffRes = null
for (let i = 2; i <= 5; i++) {
seqDiffRes = http.get(`${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_commits_iid']}/diffs_batch.json?w=0&per_page=20&page=${i}`, {tags: {endpoint: 'diffs_batch.json', controller: 'Projects::MergeRequests::DiffsController', action: 'diffs_batch.json'}, redirects: 0});
seqDiffRes = http.get(`${__ENV.ENVIRONMENT_URL}/${project['unencoded_path']}/${data.endpointPath}/${project['mr_changes_iid']}/diffs_batch.json?w=0&per_page=20&page=${i}`, {tags: {endpoint: 'diffs_batch.json', controller: 'Projects::MergeRequests::DiffsController', action: 'diffs_batch.json'}, redirects: 0});
/20(0|1)/.test(seqDiffRes.status) ? successRate.add(true) : (successRate.add(false), logError(seqDiffRes));
}
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment