perfetto 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/perfetto/interceptor.rb +6 -2
- data/lib/perfetto/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 336d2d67b2921461a66687b0a06fca3ef0e925cbdc83e028bdbf2863ef3012d4
|
4
|
+
data.tar.gz: 3dc3d8b63d9029dcc10d5250f156663d5248da727652aa0b3cce42a55ac856af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2771fce6b5aa3b804f6c79d7e64fde0af8238ba25d6325707634d5612a05254df7c6dbf0b34d78d8c2f9c9f502f331e0dd954805167993378f28540cc474c57
|
7
|
+
data.tar.gz: 2a006c86b49bad07a0a0d7117c65a5813dd9a957cb24992aee9b419efe0ac3644a92f6d63338a994b97e9ef800b25dc2bc941d0434a42c20443eb04c5b7aad5d
|
data/lib/perfetto/interceptor.rb
CHANGED
@@ -46,7 +46,9 @@ module Perfetto
|
|
46
46
|
alias_method "_pfi_#{method_name}", method_name
|
47
47
|
|
48
48
|
define_method(method_name) do |*args, **kwargs, &block|
|
49
|
-
|
49
|
+
category = self.class.name
|
50
|
+
task_name = "#{self.class.name}##{method_name}"
|
51
|
+
Perfetto.trace_event_begin category, task_name
|
50
52
|
original_method.bind(self).call(*args, **kwargs, &block)
|
51
53
|
ensure
|
52
54
|
Perfetto.trace_event_end self.class.name
|
@@ -63,7 +65,9 @@ module Perfetto
|
|
63
65
|
singleton_class.send(:alias_method, "_pfc_#{method_name}", method_name)
|
64
66
|
|
65
67
|
define_singleton_method(method_name) do |*args, **kwargs, &block|
|
66
|
-
|
68
|
+
category = self.name
|
69
|
+
task_name = "#{self.name}.#{method_name}"
|
70
|
+
Perfetto.trace_event_begin category, task_name
|
67
71
|
original_method.call(*args, **kwargs, &block)
|
68
72
|
ensure
|
69
73
|
Perfetto.trace_event_end name
|
data/lib/perfetto/version.rb
CHANGED