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
Jérome Perrin
gitlab-ce
Commits
94cfd4ad
Commit
94cfd4ad
authored
Aug 22, 2016
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'metrics-typo' into 'master'
Fix typo in gitlab-workhorse header See merge request !5891
parents
9b5ffb54
2bd0ed4a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
GITLAB_WORKHORSE_VERSION
GITLAB_WORKHORSE_VERSION
+1
-1
doc/install/installation.md
doc/install/installation.md
+1
-1
lib/gitlab/middleware/rails_queue_duration.rb
lib/gitlab/middleware/rails_queue_duration.rb
+1
-1
spec/lib/gitlab/middleware/rails_queue_duration_spec.rb
spec/lib/gitlab/middleware/rails_queue_duration_spec.rb
+1
-1
No files found.
GITLAB_WORKHORSE_VERSION
View file @
94cfd4ad
0.7.
8
0.7.
10
doc/install/installation.md
View file @
94cfd4ad
...
@@ -397,7 +397,7 @@ If you are not using Linux you may have to run `gmake` instead of
...
@@ -397,7 +397,7 @@ If you are not using Linux you may have to run `gmake` instead of
cd /home/git
cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
cd gitlab-workhorse
cd gitlab-workhorse
sudo -u git -H git checkout v0.7.
8
sudo -u git -H git checkout v0.7.
10
sudo -u git -H make
sudo -u git -H make
### Initialize Database and Activate Advanced Features
### Initialize Database and Activate Advanced Features
...
...
lib/gitlab/middleware/rails_queue_duration.rb
View file @
94cfd4ad
...
@@ -11,7 +11,7 @@ module Gitlab
...
@@ -11,7 +11,7 @@ module Gitlab
def
call
(
env
)
def
call
(
env
)
trans
=
Gitlab
::
Metrics
.
current_transaction
trans
=
Gitlab
::
Metrics
.
current_transaction
proxy_start
=
env
[
'HTTP_GITLAB_WORHORSE_PROXY_START'
].
presence
proxy_start
=
env
[
'HTTP_GITLAB_WOR
K
HORSE_PROXY_START'
].
presence
if
trans
&&
proxy_start
if
trans
&&
proxy_start
# Time in milliseconds since gitlab-workhorse started the request
# Time in milliseconds since gitlab-workhorse started the request
trans
.
set
(
:rails_queue_duration
,
Time
.
now
.
to_f
*
1_000
-
proxy_start
.
to_f
/
1_000_000
)
trans
.
set
(
:rails_queue_duration
,
Time
.
now
.
to_f
*
1_000
-
proxy_start
.
to_f
/
1_000_000
)
...
...
spec/lib/gitlab/middleware/rails_queue_duration_spec.rb
View file @
94cfd4ad
...
@@ -22,7 +22,7 @@ describe Gitlab::Middleware::RailsQueueDuration do
...
@@ -22,7 +22,7 @@ describe Gitlab::Middleware::RailsQueueDuration do
end
end
it
'sets proxy_flight_time and calls the app when the header is present'
do
it
'sets proxy_flight_time and calls the app when the header is present'
do
env
[
'HTTP_GITLAB_WORHORSE_PROXY_START'
]
=
'123'
env
[
'HTTP_GITLAB_WOR
K
HORSE_PROXY_START'
]
=
'123'
expect
(
transaction
).
to
receive
(
:set
).
with
(
:rails_queue_duration
,
an_instance_of
(
Float
))
expect
(
transaction
).
to
receive
(
:set
).
with
(
:rails_queue_duration
,
an_instance_of
(
Float
))
expect
(
middleware
.
call
(
env
)).
to
eq
(
'yay'
)
expect
(
middleware
.
call
(
env
)).
to
eq
(
'yay'
)
end
end
...
...
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