Commit 014df187 authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'log-duration-in-bulk-indexer' into 'master'

Log duration of ProcessBookkeepingService#execute

See merge request gitlab-org/gitlab!30265
parents 7cb8696e 509b7ab3
......@@ -54,6 +54,8 @@ module Elastic
private
def execute_with_redis(redis)
start_time = Time.now
specs = redis.zrangebyscore(REDIS_SET_KEY, '-inf', '+inf', limit: [0, LIMIT], with_scores: true)
return if specs.empty?
......@@ -82,7 +84,8 @@ module Elastic
records_count: specs.count,
failures_count: failures.count,
first_score: first_score,
last_score: last_score
last_score: last_score,
bulk_execution_duration_s: Time.now - start_time
)
end
......
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