Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 03:09:24 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-24 03:09:24 +0300
commit2711c26beaca6c3a5a3be4b65e01557faf0185b6 (patch)
tree25d0c2ddb47e87712044884f558a9104c686805f /spec/support/helpers
parent8a7aaf86831d2a556578ae558a4fcab8bb659b20 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/helpers')
-rw-r--r--spec/support/helpers/prometheus_helpers.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/support/helpers/prometheus_helpers.rb b/spec/support/helpers/prometheus_helpers.rb
index 7c03746a395..0fdc4de1b36 100644
--- a/spec/support/helpers/prometheus_helpers.rb
+++ b/spec/support/helpers/prometheus_helpers.rb
@@ -31,15 +31,15 @@ module PrometheusHelpers
"https://prometheus.example.com/api/v1/query?#{query}"
end
- def prometheus_query_range_url(prometheus_query, start: 8.hours.ago, stop: Time.now, step: nil)
- start = start.to_f
- stop = stop.to_f
- step ||= Gitlab::PrometheusClient.compute_step(start, stop)
+ def prometheus_query_range_url(prometheus_query, start_time: 8.hours.ago, end_time: Time.now, step: nil)
+ start_time = start_time.to_f
+ end_time = end_time.to_f
+ step ||= Gitlab::PrometheusClient.compute_step(start_time, end_time)
query = {
query: prometheus_query,
- start: start,
- end: stop,
+ start: start_time,
+ end: end_time,
step: step
}.to_query
@@ -50,11 +50,11 @@ module PrometheusHelpers
"https://prometheus.example.com/api/v1/label/#{name}/values"
end
- def prometheus_series_url(*matches, start: 8.hours.ago, stop: Time.now)
+ def prometheus_series_url(*matches, start_time: 8.hours.ago, end_time: Time.now)
query = {
match: matches,
- start: start.to_f,
- end: stop.to_f
+ start: start_time.to_f,
+ end: end_time.to_f
}.to_query
"https://prometheus.example.com/api/v1/series?#{query}"
end