BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
4cf6be2b
Commit
4cf6be2b
authored
Sep 06, 2017
by
Pawel Chojnacki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Differentiatie between class and instance methods
parent
815b8db1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
instrumentation.rb
lib/gitlab/metrics/instrumentation.rb
+5
-3
No files found.
lib/gitlab/metrics/instrumentation.rb
View file @
4cf6be2b
...
...
@@ -123,14 +123,16 @@ module Gitlab
if
type
==
:instance
target
=
mod
label
=
"
#{
mod
.
name
}
#
#{
name
}
"
method_name
=
"
#
#{
name
}
"
method
=
mod
.
instance_method
(
name
)
else
target
=
mod
.
singleton_class
label
=
"
#{
mod
.
name
}
.
#{
name
}
"
method_name
=
"
.
#{
name
}
"
method
=
mod
.
method
(
name
)
end
label
=
"
#{
mod
.
name
}#{
method_name
}
"
unless
instrumented?
(
target
)
target
.
instance_variable_set
(
PROXY_IVAR
,
Module
.
new
)
end
...
...
@@ -153,7 +155,7 @@ module Gitlab
proxy_module
.
class_eval
<<-
EOF
,
__FILE__
,
__LINE__
+
1
def
#{
name
}
(
#{
args_signature
}
)
if trans = Gitlab::Metrics::Instrumentation.transaction
trans.method_call_for(
#{
label
.
to_sym
.
inspect
}
,
#{
mod
.
name
.
to_sym
.
inspect
}
,
#{
name
.
to_sym
.
inspect
}
)
trans.method_call_for(
#{
label
.
to_sym
.
inspect
}
,
#{
mod
.
name
.
inspect
}
, "
#{
method_name
}
"
)
.measure { super }
else
super
...
...
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