Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
a61da802
Commit
a61da802
authored
Oct 18, 2018
by
Heinrich Lee Yu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use monotonic time in computing web hook execution time
parent
c5d8e7fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
app/services/web_hook_service.rb
app/services/web_hook_service.rb
+3
-3
No files found.
app/services/web_hook_service.rb
View file @
a61da802
...
@@ -22,7 +22,7 @@ class WebHookService
...
@@ -22,7 +22,7 @@ class WebHookService
end
end
def
execute
def
execute
start_time
=
Time
.
now
start_time
=
Gitlab
::
Metrics
::
System
.
monotonic_time
response
=
if
parsed_url
.
userinfo
.
blank?
response
=
if
parsed_url
.
userinfo
.
blank?
make_request
(
hook
.
url
)
make_request
(
hook
.
url
)
...
@@ -35,7 +35,7 @@ class WebHookService
...
@@ -35,7 +35,7 @@ class WebHookService
url:
hook
.
url
,
url:
hook
.
url
,
request_data:
data
,
request_data:
data
,
response:
response
,
response:
response
,
execution_duration:
Time
.
now
-
start_time
execution_duration:
Gitlab
::
Metrics
::
System
.
monotonic_time
-
start_time
)
)
{
{
...
@@ -49,7 +49,7 @@ class WebHookService
...
@@ -49,7 +49,7 @@ class WebHookService
url:
hook
.
url
,
url:
hook
.
url
,
request_data:
data
,
request_data:
data
,
response:
InternalErrorResponse
.
new
,
response:
InternalErrorResponse
.
new
,
execution_duration:
Time
.
now
-
start_time
,
execution_duration:
Gitlab
::
Metrics
::
System
.
monotonic_time
-
start_time
,
error_message:
e
.
to_s
error_message:
e
.
to_s
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment