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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
b49af7f7
Commit
b49af7f7
authored
Sep 05, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
6601de8d
145c3476
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
app/models/concerns/routable.rb
app/models/concerns/routable.rb
+4
-8
lib/gitlab/danger/helper.rb
lib/gitlab/danger/helper.rb
+2
-1
No files found.
app/models/concerns/routable.rb
View file @
b49af7f7
...
...
@@ -33,7 +33,7 @@ module Routable
#
# Returns a single object, or nil.
def
find_by_full_path
(
path
,
follow_redirects:
false
)
increment_counter
(
:routable_find_by_full_path
,
'Number of calls to Routable.
find_by_full_path'
)
routable_calls_counter
.
increment
(
method:
'
find_by_full_path'
)
if
Feature
.
enabled?
(
:routable_two_step_lookup
)
# Case sensitive match first (it's cheaper and the usual case)
...
...
@@ -61,7 +61,7 @@ module Routable
def
where_full_path_in
(
paths
)
return
none
if
paths
.
empty?
increment_counter
(
:routable_where_full_path_in
,
'Number of calls to Routable.
where_full_path_in'
)
routable_calls_counter
.
increment
(
method:
'
where_full_path_in'
)
wheres
=
paths
.
map
do
|
path
|
"(LOWER(routes.path) = LOWER(
#{
connection
.
quote
(
path
)
}
))"
...
...
@@ -71,12 +71,8 @@ module Routable
end
# Temporary instrumentation of method calls
def
increment_counter
(
counter
,
description
)
@counters
[
counter
]
||=
Gitlab
::
Metrics
.
counter
(
counter
,
description
)
@counters
[
counter
].
increment
rescue
# ignore the error
def
routable_calls_counter
@routable_calls_counter
||=
Gitlab
::
Metrics
.
counter
(
:gitlab_routable_calls_total
,
'Number of calls to Routable by method'
)
end
end
...
...
lib/gitlab/danger/helper.rb
View file @
b49af7f7
...
...
@@ -110,7 +110,8 @@ module Gitlab
karma
\.
config
\.
js |
webpack
\.
config
\.
js |
package
\.
json |
yarn
\.
lock
yarn
\.
lock |
\.
gitlab/ci/frontend
\.
gitlab-ci
\.
yml
)
\z
}x
=>
:frontend
,
%r{
\A
(ee/)?db/(?!fixtures)[^/]+}
=>
:database
,
...
...
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