diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-06-13 18:49:21 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-06-14 12:13:07 +0200 |
commit | 4da191c5a55081f258376cab787a98c596777da1 (patch) | |
tree | 8e6bf24b7f7a0ad5a5ae29e248da2bbb9ae04aeb /doc/development/instrumentation.md | |
parent | 0c0ef7dfb6afb1695b62037fc0fa5aba6ce697d7 (diff) | |
download | gitlab-ce-18527-instrument-private-methods.tar.gz |
Instrument private/protected methods18527-instrument-private-methods
By default instrumentation will instrument public,
protected and private methods, because usually
heavy work is done on private method or at least
that’s what facts is showing
Diffstat (limited to 'doc/development/instrumentation.md')
-rw-r--r-- | doc/development/instrumentation.md | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/doc/development/instrumentation.md b/doc/development/instrumentation.md index 9168c70945a..0b375917061 100644 --- a/doc/development/instrumentation.md +++ b/doc/development/instrumentation.md @@ -15,8 +15,8 @@ instrument code: * `instrument_instance_method`: instruments a single instance method. * `instrument_class_hierarchy`: given a Class this method will recursively instrument all sub-classes (both class and instance methods). -* `instrument_methods`: instruments all public class methods of a Module. -* `instrument_instance_methods`: instruments all public instance methods of a +* `instrument_methods`: instruments all public and private class methods of a Module. +* `instrument_instance_methods`: instruments all public and private instance methods of a Module. To remove the need for typing the full `Gitlab::Metrics::Instrumentation` @@ -102,8 +102,6 @@ def #{name}(#{args_signature}) duration = (Time.now - start) * 1000.0 if duration >= Gitlab::Metrics.method_call_threshold - trans.increment(:method_duration, duration) - trans.add_metric(Gitlab::Metrics::Instrumentation::SERIES, { duration: duration }, method: #{label.inspect}) |