Skip to content
代码片段 群组 项目
提交 38d76ce0 编辑于 作者: Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
浏览文件

Merge branch 'mg-sidekiq-target-scheduling-log' into 'master'

No related branches found
No related tags found
无相关合并请求
......@@ -100,6 +100,8 @@ def log_job_done(job, started_time, payload, job_exception = nil)
unless job_urgency.empty?
payload['urgency'] = job_urgency
payload['target_duration_s'] = Gitlab::Metrics::SidekiqSlis.execution_duration_for_urgency(job_urgency)
payload['target_scheduling_latency_s'] =
Gitlab::Metrics::SidekiqSlis.queueing_duration_for_urgency(job_urgency)
end
payload
......
......@@ -463,11 +463,12 @@
let(:expected_end_payload) do
end_payload.merge(
'urgency' => 'high',
'target_duration_s' => 10
'target_duration_s' => 10,
'target_scheduling_latency_s' => 10
)
end
it 'logs job done with urgency and target_duration_s fields' do
it 'logs job done with urgency, target_duration_s and target_scheduling_latency_s fields' do
travel_to(timestamp) do
expect(logger).to receive(:info).with(start_payload).ordered
expect(logger).to receive(:info).with(expected_end_payload).ordered
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册