Commit a001a7e3 authored by Grant Young's avatar Grant Young

Merge branch 'gy-file-memory-fixes' into 'master'

Switch all file tests to use responseType of none

See merge request !161
parents 16680109 d58bdb54
......@@ -343,7 +343,7 @@ After running the results will be in the tool's `k6/results` folder. More detail
Two factors that can significantly affect the Tool's results are the conditions it's run in - Namely Location (physically in relation to the GitLab Environment) and Network.
The GPT is designed to test the GitLab application's server performance directly at max throughputs. As such, it's recommended to be run as close as possible physically to the GitLab environment and in optimum network conditions. Through this, the results given by the Tool can be trusted to be representative of the application's actual performance and not disrupted by location or network issues. If this isn't possible an Environment can be configured to specify a latency that the Tool will take into account. See the [Environments](#environments) section for more info.
The GPT is designed to test the GitLab application's server performance directly at max throughputs, which in turn involves heavy network use. As such, it's recommended to be run as close as possible physically to the GitLab environment and in optimum network conditions. Through this, the results given by the Tool can be trusted to be representative of the application's actual performance and not disrupted by location or network issues. If this isn't possible an Environment can be configured to specify a latency that the Tool will take into account. See the [Environments](#environments) section for more info.
That said, the GPT could also be utilized to test your location and network conditions as a secondary test. For example, you could run the Tool from a desired location (and network conditions) with a representative throughput (i.e. the amount of users that would be typical for that location). In this example this would be run after doing the primary test as described above then compared to validate that your location and network conditions are also performing as expected.
......
......@@ -36,7 +36,7 @@ export default function() {
group("API - Project Repository File", function() {
let project = selectProject(projects);
let params = { headers: { "Accept": "application/json", "PRIVATE-TOKEN": `${__ENV.ACCESS_TOKEN}` } };
let params = { headers: { "Accept": "application/json", "PRIVATE-TOKEN": `${__ENV.ACCESS_TOKEN}` }, responseType: 'none' };
let res = http.get(`${__ENV.ENVIRONMENT_URL}/api/v4/projects/${project['group']}%2F${project['name']}/repository/files/${project['file_path']}?ref=master`, params);
/20(0|1)/.test(res.status) ? successRate.add(true) : (successRate.add(false), logError(res));
});
......
......@@ -36,7 +36,7 @@ export default function() {
group("API - Project Repository File Raw", function() {
let project = selectProject(projects);
let params = { headers: { "Accept": "application/json", "PRIVATE-TOKEN": `${__ENV.ACCESS_TOKEN}` } };
let params = { headers: { "Accept": "application/json", "PRIVATE-TOKEN": `${__ENV.ACCESS_TOKEN}` }, responseType: 'none' };
let res = http.get(`${__ENV.ENVIRONMENT_URL}/api/v4/projects/${project['group']}%2F${project['name']}/repository/files/${project['file_path']}/raw?ref=master`, params);
/20(0|1)/.test(res.status) ? successRate.add(true) : (successRate.add(false), logError(res));
});
......
......@@ -46,8 +46,8 @@ export default function() {
let project = selectProject(projects);
let responses = http.batch([
["GET", `${__ENV.ENVIRONMENT_URL}/${project['group']}/${project['name']}/blob/master/${project['file_path']}`, null, {tags: {endpoint: 'file', controller: 'Projects::BlobController', action: 'show'}}],
["GET", `${__ENV.ENVIRONMENT_URL}/${project['group']}/${project['name']}/blob/master/${project['file_path']}?format=json`, null, {tags: {endpoint: 'file?format=json', controller: 'Projects::BlobController', action: 'show.json'}}]
["GET", `${__ENV.ENVIRONMENT_URL}/${project['group']}/${project['name']}/blob/master/${project['file_path']}`, null, {tags: {endpoint: 'file', controller: 'Projects::BlobController', action: 'show'}, responseType: 'none'}],
["GET", `${__ENV.ENVIRONMENT_URL}/${project['group']}/${project['name']}/blob/master/${project['file_path']}?format=json`, null, {tags: {endpoint: 'file?format=json', controller: 'Projects::BlobController', action: 'show.json'}, responseType: 'none'}]
]);
responses.forEach(function(res) {
/20(0|1)/.test(res.status) ? successRate.add(true) : (successRate.add(false), logError(res));
......
Markdown is supported
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