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
iv
gitlab-ce
Commits
79938744
Commit
79938744
authored
Jan 07, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into task-list-class
parents
c3865bda
61561a9e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
13 deletions
+27
-13
CHANGELOG
CHANGELOG
+2
-1
app/assets/javascripts/branch-graph.js.coffee
app/assets/javascripts/branch-graph.js.coffee
+1
-1
lib/gitlab/metrics/rack_middleware.rb
lib/gitlab/metrics/rack_middleware.rb
+2
-2
lib/gitlab/metrics/transaction.rb
lib/gitlab/metrics/transaction.rb
+5
-3
lib/tasks/gitlab/check.rake
lib/tasks/gitlab/check.rake
+1
-1
spec/lib/gitlab/metrics/rack_middleware_spec.rb
spec/lib/gitlab/metrics/rack_middleware_spec.rb
+3
-3
spec/lib/gitlab/metrics/transaction_spec.rb
spec/lib/gitlab/metrics/transaction_spec.rb
+13
-2
No files found.
CHANGELOG
View file @
79938744
Please view this file on the master branch, on stable branches it's out of date.
v 8.4.0 (unreleased)
- Fix missing date of month in network graph when commits span a month (Stan Hu)
- Expire view caches when application settings change (e.g. Gravatar disabled) (Stan Hu)
- Don't notify users twice if they are both project watchers and subscribers (Stan Hu)
- Implement new UI for group page
...
...
@@ -22,6 +23,7 @@ v 8.4.0 (unreleased)
- Validate README format before displaying
- Enable Microsoft Azure OAuth2 support (Janis Meybohm)
- Properly set task-list class on single item task lists
- Add file finder feature in tree view (koreamic)
v 8.3.3 (unreleased)
- Get "Merge when build succeeds" to work when commits were pushed to MR target branch while builds were running
...
...
@@ -107,7 +109,6 @@ v 8.3.0
- Fix online editor should not remove newlines at the end of the file
- Expose Git's version in the admin area
- Show "New Merge Request" buttons on canonical repos when you have a fork (Josh Frye)
- Add file finder feature in tree view
v 8.2.3
- Fix application settings cache not expiring after changes (Stan Hu)
...
...
app/assets/javascripts/branch-graph.js.coffee
View file @
79938744
...
...
@@ -66,7 +66,7 @@ class @BranchGraph
r
.
rect
(
40
,
0
,
30
,
@
barHeight
).
attr
fill
:
"#444"
for
day
,
mm
in
@
days
if
cuday
isnt
day
[
0
]
if
cuday
isnt
day
[
0
]
||
cumonth
isnt
day
[
1
]
# Dates
r
.
text
(
55
,
@
offsetY
+
@
unitTime
*
mm
,
day
[
0
])
.
attr
(
...
...
lib/gitlab/metrics/rack_middleware.rb
View file @
79938744
...
...
@@ -32,8 +32,8 @@ module Gitlab
def
transaction_from_env
(
env
)
trans
=
Transaction
.
new
trans
.
add_tag
(
:request_method
,
env
[
'REQUEST_METHOD
'
])
trans
.
add_tag
(
:request_uri
,
env
[
'REQUEST_URI
'
])
trans
.
set
(
:request_uri
,
env
[
'REQUEST_URI
'
])
trans
.
set
(
:request_method
,
env
[
'REQUEST_METHOD
'
])
trans
end
...
...
lib/gitlab/metrics/transaction.rb
View file @
79938744
...
...
@@ -4,7 +4,7 @@ module Gitlab
class
Transaction
THREAD_KEY
=
:_gitlab_metrics_transaction
attr_reader
:
uuid
,
:tag
s
attr_reader
:
tags
,
:value
s
def
self
.
current
Thread
.
current
[
THREAD_KEY
]
...
...
@@ -12,7 +12,6 @@ module Gitlab
def
initialize
@metrics
=
[]
@uuid
=
SecureRandom
.
uuid
@started_at
=
nil
@finished_at
=
nil
...
...
@@ -38,7 +37,6 @@ module Gitlab
end
def
add_metric
(
series
,
values
,
tags
=
{})
tags
=
tags
.
merge
(
transaction_id:
@uuid
)
prefix
=
sidekiq?
?
'sidekiq_'
:
'rails_'
@metrics
<<
Metric
.
new
(
"
#{
prefix
}#{
series
}
"
,
values
,
tags
)
...
...
@@ -48,6 +46,10 @@ module Gitlab
@values
[
name
]
+=
value
end
def
set
(
name
,
value
)
@values
[
name
]
=
value
end
def
add_tag
(
key
,
value
)
@tags
[
key
]
=
value
end
...
...
lib/tasks/gitlab/check.rake
View file @
79938744
...
...
@@ -431,7 +431,7 @@ namespace :gitlab do
try_fixing_it
(
"sudo chmod -R ug+rwX,o-rwx
#{
repo_base_path
}
"
,
"sudo chmod -R ug-s
#{
repo_base_path
}
"
,
"find
#{
repo_base_path
}
-type d -print0 | sudo xargs -0 chmod g+s"
"
sudo
find
#{
repo_base_path
}
-type d -print0 | sudo xargs -0 chmod g+s"
)
for_more_information
(
see_installation_guide_section
"GitLab Shell"
...
...
spec/lib/gitlab/metrics/rack_middleware_spec.rb
View file @
79938744
...
...
@@ -40,9 +40,9 @@ describe Gitlab::Metrics::RackMiddleware do
expect
(
transaction
).
to
be_an_instance_of
(
Gitlab
::
Metrics
::
Transaction
)
end
it
'
tags the transaction with the request method and URI
'
do
expect
(
transaction
.
tag
s
[
:request_method
]).
to
eq
(
'GET'
)
expect
(
transaction
.
tag
s
[
:request_uri
]).
to
eq
(
'/foo'
)
it
'
stores the request method and URI in the transaction as values
'
do
expect
(
transaction
.
value
s
[
:request_method
]).
to
eq
(
'GET'
)
expect
(
transaction
.
value
s
[
:request_uri
]).
to
eq
(
'/foo'
)
end
end
...
...
spec/lib/gitlab/metrics/transaction_spec.rb
View file @
79938744
...
...
@@ -30,9 +30,9 @@ describe Gitlab::Metrics::Transaction do
end
describe
'#add_metric'
do
it
'adds a metric t
agged with the transaction UUID
'
do
it
'adds a metric t
o the transaction
'
do
expect
(
Gitlab
::
Metrics
::
Metric
).
to
receive
(
:new
).
with
(
'rails_foo'
,
{
number:
10
},
{
transaction_id:
transaction
.
uuid
})
with
(
'rails_foo'
,
{
number:
10
},
{})
transaction
.
add_metric
(
'foo'
,
number:
10
)
end
...
...
@@ -50,6 +50,17 @@ describe Gitlab::Metrics::Transaction do
end
end
describe
'#set'
do
it
'sets a value'
do
transaction
.
set
(
:number
,
10
)
expect
(
transaction
).
to
receive
(
:add_metric
).
with
(
'transactions'
,
{
duration:
0.0
,
number:
10
},
{})
transaction
.
track_self
end
end
describe
'#add_tag'
do
it
'adds a tag'
do
transaction
.
add_tag
(
:foo
,
'bar'
)
...
...
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