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 /lib/gitlab/prometheus
parent8a7aaf86831d2a556578ae558a4fcab8bb659b20 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/prometheus')
-rw-r--r--lib/gitlab/prometheus/queries/deployment_query.rb4
-rw-r--r--lib/gitlab/prometheus/queries/environment_query.rb4
-rw-r--r--lib/gitlab/prometheus/queries/knative_invocation_query.rb2
-rw-r--r--lib/gitlab/prometheus/queries/matched_metric_query.rb2
-rw-r--r--lib/gitlab/prometheus/queries/query_additional_metrics.rb2
5 files changed, 7 insertions, 7 deletions
diff --git a/lib/gitlab/prometheus/queries/deployment_query.rb b/lib/gitlab/prometheus/queries/deployment_query.rb
index fc32c4353f0..13d85d33cc0 100644
--- a/lib/gitlab/prometheus/queries/deployment_query.rb
+++ b/lib/gitlab/prometheus/queries/deployment_query.rb
@@ -18,11 +18,11 @@ module Gitlab
timeframe_end = (deployment.created_at + 30.minutes).to_f
{
- memory_values: client_query_range(memory_query, start: timeframe_start, stop: timeframe_end),
+ memory_values: client_query_range(memory_query, start_time: timeframe_start, end_time: timeframe_end),
memory_before: client_query(memory_avg_query, time: deployment.created_at.to_f),
memory_after: client_query(memory_avg_query, time: timeframe_end),
- cpu_values: client_query_range(cpu_query, start: timeframe_start, stop: timeframe_end),
+ cpu_values: client_query_range(cpu_query, start_time: timeframe_start, end_time: timeframe_end),
cpu_before: client_query(cpu_avg_query, time: deployment.created_at.to_f),
cpu_after: client_query(cpu_avg_query, time: timeframe_end)
}
diff --git a/lib/gitlab/prometheus/queries/environment_query.rb b/lib/gitlab/prometheus/queries/environment_query.rb
index 56195f85a70..5f3093eecd4 100644
--- a/lib/gitlab/prometheus/queries/environment_query.rb
+++ b/lib/gitlab/prometheus/queries/environment_query.rb
@@ -15,9 +15,9 @@ module Gitlab
cpu_query = raw_cpu_usage_query(environment_slug)
{
- memory_values: client_query_range(memory_query, start: timeframe_start, stop: timeframe_end),
+ memory_values: client_query_range(memory_query, start_time: timeframe_start, end_time: timeframe_end),
memory_current: client_query(memory_query, time: timeframe_end),
- cpu_values: client_query_range(cpu_query, start: timeframe_start, stop: timeframe_end),
+ cpu_values: client_query_range(cpu_query, start_time: timeframe_start, end_time: timeframe_end),
cpu_current: client_query(cpu_query, time: timeframe_end)
}
end
diff --git a/lib/gitlab/prometheus/queries/knative_invocation_query.rb b/lib/gitlab/prometheus/queries/knative_invocation_query.rb
index abc90bad9c3..6438995b576 100644
--- a/lib/gitlab/prometheus/queries/knative_invocation_query.rb
+++ b/lib/gitlab/prometheus/queries/knative_invocation_query.rb
@@ -29,7 +29,7 @@ module Gitlab
def run_query(query, context)
query %= context
- client_query_range(query, start: 8.hours.ago.to_f, stop: Time.now.to_f)
+ client_query_range(query, start_time: 8.hours.ago.to_f, end_time: Time.now.to_f)
end
def self.transform_reactive_result(result)
diff --git a/lib/gitlab/prometheus/queries/matched_metric_query.rb b/lib/gitlab/prometheus/queries/matched_metric_query.rb
index 32294756aa2..e4d44df3baf 100644
--- a/lib/gitlab/prometheus/queries/matched_metric_query.rb
+++ b/lib/gitlab/prometheus/queries/matched_metric_query.rb
@@ -43,7 +43,7 @@ module Gitlab
series = metric_groups.flat_map(&:metrics).flat_map(&:required_metrics).uniq
lookup = series.each_slice(MAX_QUERY_ITEMS).flat_map do |batched_series|
- client_series(*batched_series, start: timeframe_start, stop: timeframe_end)
+ client_series(*batched_series, start_time: timeframe_start, end_time: timeframe_end)
.select(&method(:has_matching_label?))
.map { |series_info| [series_info['__name__'], true] }
end
diff --git a/lib/gitlab/prometheus/queries/query_additional_metrics.rb b/lib/gitlab/prometheus/queries/query_additional_metrics.rb
index 1bab2ae7d75..a5e7d0ac9d5 100644
--- a/lib/gitlab/prometheus/queries/query_additional_metrics.rb
+++ b/lib/gitlab/prometheus/queries/query_additional_metrics.rb
@@ -59,7 +59,7 @@ module Gitlab
result =
if query.key?(:query_range)
query[:query_range] %= context
- client_query_range(query[:query_range], start: context[:timeframe_start], stop: context[:timeframe_end])
+ client_query_range(query[:query_range], start_time: context[:timeframe_start], end_time: context[:timeframe_end])
else
query[:query] %= context
client_query(query[:query], time: context[:timeframe_end])