Commit b408d88b authored by Grant Young's avatar Grant Young

Merge branch 'gy-non-ha-2k' into 'master'

Change 2k to non-HA

See merge request !152
parents d13cbfe8 924442f5
......@@ -4,14 +4,14 @@ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
$stdout.sync = true
require 'chronic_duration'
require 'test_info'
require 'fileutils'
require 'influxdb'
require 'optimist'
require 'pathname'
require 'rainbow'
require 'run_k6'
require 'pathname'
require 'table_print'
require 'test_info'
require 'time'
require 'tmpdir'
......@@ -90,7 +90,7 @@ rescue Interrupt
rescue ArgumentError => e
warn Rainbow(e).yellow
next
rescue NoMethodError
rescue NoMethodError => e
warn Rainbow("Test failed and output couldn't be parsed: \n#{e}").yellow
next
rescue StandardError => e
......@@ -114,7 +114,7 @@ puts Rainbow("All k6 tests have finished after #{run_time}s!").green
tests_with_issues = TestInfo.get_tests_info(tests).select { |test_info| !test_info[:issues].nil? }
unless tests_with_issues.empty? || ENV['GPT_SKIP_KNOWN_ISSUES'] == 'true'
puts "\n█ Known issues\n\nNote that the following endpoints below have known issues. These tests have either been run with a custom lower threshold limit applied or are quarantined until the issue is fixed:\n\n"
tp.set(:max_width, 100)
tp.set(:max_width, 150)
tp(tests_with_issues, :name, :issues)
puts "\nFull list of issues found both past and present can be found here: https://gitlab.com/gitlab-org/gitlab/-/issues?label_name%5B%5D=Quality%3Aperformance-issues\n"
end
......
......@@ -35,34 +35,6 @@
},
"issue_iid": "4218",
"user": "root"
},
{
"name": "gitlabhq2",
"group": "qa-perf-testing",
"branch": "10-0-stable",
"commit_sha": "0a99e022",
"commit_sha_signed": "6526e91f",
"compare_commits_sha": ["aec887ab", "5bfb7558"],
"file_path": "qa%2fqa%2erb",
"dir_path": "app%2Fassets%2Fimages%2Femoji",
"git_push_data": {
"branch_current_head_sha": "8606c89683c913641243fc667edeb90600fe1a0e",
"branch_new_head_sha": "8bcb4fd6f5780ebe9dc1ec80904b060b89a937d2",
"branch_name": "12-1-auto-deploy-20190714"
},
"mr_commits_iid": "10495",
"mr_discussions_iid": "6958",
"search": {
"projects": "gitlab",
"issues": "broken",
"commits": "fix",
"merge_requests": "fix",
"milestones": "2.6",
"blobs": "test",
"users": "root"
},
"issue_iid": "4218",
"user": "root"
}
]
}
......@@ -16,7 +16,7 @@ export let endpointCount = 2
export let webProtoRps = adjustRps(__ENV.WEB_ENDPOINT_THROUGHPUT)
export let webProtoStages = adjustStageVUs(__ENV.WEB_ENDPOINT_THROUGHPUT)
export let rpsThresholds = __ENV.ENVIRONMENT_REPO_STORAGE == "nfs" ? getRpsThresholds(__ENV.WEB_ENDPOINT_THROUGHPUT * 0.5, endpointCount) : getRpsThresholds(__ENV.WEB_ENDPOINT_THROUGHPUT * 0.6, endpointCount)
export let ttfbThreshold = __ENV.ENVIRONMENT_REPO_STORAGE == "nfs" ? getTtfbThreshold(3000) : getTtfbThreshold(1000)
export let ttfbThreshold = __ENV.ENVIRONMENT_REPO_STORAGE == "nfs" ? getTtfbThreshold(3000) : getTtfbThreshold(1250)
export let successRate = new Rate("successful_requests")
export let options = {
thresholds: {
......
......@@ -7,7 +7,10 @@ module GPTCommon
def make_http_request(method: 'get', url: nil, params: {}, headers: {}, body: "", show_response: false, fail_on_error: true)
raise "URL not defined for making request. Exiting..." unless url
res = body.empty? ? HTTP.follow.method(method).call(url, form: params, headers: headers) : HTTP.follow.method(method).call(url, body: body, headers: headers)
ctx = OpenSSL::SSL::SSLContext.new
ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE
res = body.empty? ? HTTP.follow.method(method).call(url, form: params, headers: headers, ssl_context: ctx) : HTTP.follow.method(method).call(url, body: body, headers: headers, ssl_context: ctx)
if show_response
if res.content_type.mime_type == "application/json"
......
......@@ -163,11 +163,13 @@ module RunK6
output << line
puts line
status = false if line.match?(/No data generated/)
end
status = wait_thr.value
status = wait_thr.value.success? if status.nil?
end
[status.success?, output]
[status, output]
end
def get_test_results(test_file:, status:, output:)
......@@ -231,7 +233,7 @@ module RunK6
tp_result["Name"] = test_result['name'] || '-'
tp_result["RPS"] = test_result['rps_target'] ? "#{test_result['rps_target']}/s" : '-'
tp_result["RPS Result"] = [test_result['rps_target'], test_result['rps_threshold']].none?(&:nil?) ? "#{test_result['rps_result']}/s (>#{test_result['rps_threshold']}/s)" : '-'
tp_result["RPS Result"] = [test_result['rps_result'], test_result['rps_threshold']].none?(&:nil?) ? "#{test_result['rps_result']}/s (>#{test_result['rps_threshold']}/s)" : '-'
tp_result["TTFB Avg"] = test_result['ttfb_avg'] ? "#{test_result['ttfb_avg']}ms" : '-'
tp_result["TTFB P90"] = [test_result['ttfb_p90'], test_result['ttfb_p90_threshold']].none?(&:nil?) ? "#{test_result['ttfb_p90']}ms (<#{test_result['ttfb_p90_threshold']}ms)" : '-'
tp_result["Req Status"] = [test_result['success_rate'], test_result['success_rate_threshold']].none?(&:nil?) ? "#{test_result['success_rate']}% (>#{test_result['success_rate_threshold']}%)" : '-'
......
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