Use monotonic time in computing web hook execution time
This commit is contained in:
parent
c5d8e7fcee
commit
a61da80208
1 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ class WebHookService
|
|||
end
|
||||
|
||||
def execute
|
||||
start_time = Time.now
|
||||
start_time = Gitlab::Metrics::System.monotonic_time
|
||||
|
||||
response = if parsed_url.userinfo.blank?
|
||||
make_request(hook.url)
|
||||
|
@ -35,7 +35,7 @@ class WebHookService
|
|||
url: hook.url,
|
||||
request_data: data,
|
||||
response: response,
|
||||
execution_duration: Time.now - start_time
|
||||
execution_duration: Gitlab::Metrics::System.monotonic_time - start_time
|
||||
)
|
||||
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ class WebHookService
|
|||
url: hook.url,
|
||||
request_data: data,
|
||||
response: InternalErrorResponse.new,
|
||||
execution_duration: Time.now - start_time,
|
||||
execution_duration: Gitlab::Metrics::System.monotonic_time - start_time,
|
||||
error_message: e.to_s
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue