vernier 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/vernier +3 -0
- data/lib/vernier/autorun.rb +2 -1
- data/lib/vernier/collector.rb +2 -2
- data/lib/vernier/hooks/active_support.rb +85 -3
- data/lib/vernier/output/firefox.rb +3 -3
- data/lib/vernier/thread_names.rb +1 -1
- data/lib/vernier/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b450ebff29010a5a95e3817bc67d925f99ecca003ceacf15bdb390805e314045
|
4
|
+
data.tar.gz: c5c2ab7f3c3e29176685db787f9d4be9acbd5f798532ea571bd8710c78e05e62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe6d2aaba11eb9955fa95ec2bb2d0aaf14945b0fc70184251fc46a763a45f0fa14ede8bf7e959aa43160b96531fa11efc9919a7352f2d703382d32310dd739a5
|
7
|
+
data.tar.gz: 6f0f28086118df8cefbb533a8ca822f14410f460e7fb933eed1655ecdbc07d19e823986c1035d9dfc10a728b6966fa9d90c474a60e4a2b4ac0dc9e02bda70719
|
data/exe/vernier
CHANGED
@@ -25,6 +25,9 @@ parser = OptionParser.new(banner) do |o|
|
|
25
25
|
o.on('--start-paused', "don't automatically start the profiler") do
|
26
26
|
options[:start_paused] = true
|
27
27
|
end
|
28
|
+
o.on('--hooks [HOOKS]', String, "Enable instrumentation hooks. Currently supported: rails") do |s|
|
29
|
+
options[:hooks] = s
|
30
|
+
end
|
28
31
|
end
|
29
32
|
|
30
33
|
parser.parse!
|
data/lib/vernier/autorun.rb
CHANGED
@@ -18,10 +18,11 @@ module Vernier
|
|
18
18
|
def self.start
|
19
19
|
interval = options.fetch(:interval, 500).to_i
|
20
20
|
allocation_sample_rate = options.fetch(:allocation_sample_rate, 0).to_i
|
21
|
+
hooks = options.fetch(:hooks, "").split(",")
|
21
22
|
|
22
23
|
STDERR.puts("starting profiler with interval #{interval}")
|
23
24
|
|
24
|
-
@collector = Vernier::Collector.new(:wall, interval:, allocation_sample_rate:)
|
25
|
+
@collector = Vernier::Collector.new(:wall, interval:, allocation_sample_rate:, hooks:)
|
25
26
|
@collector.start
|
26
27
|
end
|
27
28
|
|
data/lib/vernier/collector.rb
CHANGED
@@ -29,11 +29,11 @@ module Vernier
|
|
29
29
|
end
|
30
30
|
|
31
31
|
private def add_hook(hook)
|
32
|
-
case hook
|
32
|
+
case hook.to_sym
|
33
33
|
when :rails, :activesupport
|
34
34
|
@hooks << Vernier::Hooks::ActiveSupport.new(self)
|
35
35
|
else
|
36
|
-
warn "Unknown hook: #{hook}"
|
36
|
+
warn "Unknown hook: #{hook.inspect}"
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -7,9 +7,12 @@ module Vernier
|
|
7
7
|
{
|
8
8
|
name: "sql.active_record",
|
9
9
|
display: [ "marker-chart", "marker-table" ],
|
10
|
+
tooltipLabel: "{marker.data.name}",
|
11
|
+
chartLabel: "{marker.data.name}",
|
12
|
+
tableLabel: "{marker.data.sql}",
|
10
13
|
data: [
|
11
|
-
{ key: "sql", format: "string" },
|
12
|
-
{ key: "name", format: "string" },
|
14
|
+
{ key: "sql", format: "string", searchable: true },
|
15
|
+
{ key: "name", format: "string", searchable: true },
|
13
16
|
{ key: "type_casted_binds", label: "binds", format: "string"
|
14
17
|
}
|
15
18
|
]
|
@@ -17,25 +20,50 @@ module Vernier
|
|
17
20
|
{
|
18
21
|
name: "instantiation.active_record",
|
19
22
|
display: [ "marker-chart", "marker-table" ],
|
23
|
+
tooltipLabel: "{marker.data.record_count} × {marker.data.class_name}",
|
24
|
+
chartLabel: "{marker.data.record_count} × {marker.data.class_name}",
|
25
|
+
tableLabel: "Instantiate {marker.data.record_count} × {marker.data.class_name}",
|
20
26
|
data: [
|
21
27
|
{ key: "record_count", format: "integer" },
|
22
28
|
{ key: "class_name", format: "string" }
|
23
29
|
]
|
24
30
|
},
|
31
|
+
{
|
32
|
+
name: "start_processing.action_controller",
|
33
|
+
display: [ "marker-chart", "marker-table" ],
|
34
|
+
tooltipLabel: '{marker.data.method} {marker.data.controller}#{marker.data.action}',
|
35
|
+
chartLabel: '{marker.data.method} {marker.data.controller}#{marker.data.action}',
|
36
|
+
tableLabel: '{marker.data.method} {marker.data.controller}#{marker.data.action}',
|
37
|
+
data: [
|
38
|
+
{ key: "controller", format: "string" },
|
39
|
+
{ key: "action", format: "string" },
|
40
|
+
{ key: "status", format: "integer" },
|
41
|
+
{ key: "path", format: "string" },
|
42
|
+
{ key: "method", format: "string" },
|
43
|
+
{ key: "format", format: "string" }
|
44
|
+
]
|
45
|
+
},
|
25
46
|
{
|
26
47
|
name: "process_action.action_controller",
|
27
48
|
display: [ "marker-chart", "marker-table" ],
|
49
|
+
tooltipLabel: '{marker.data.method} {marker.data.controller}#{marker.data.action}',
|
50
|
+
chartLabel: '{marker.data.method} {marker.data.controller}#{marker.data.action}',
|
51
|
+
tableLabel: '{marker.data.method} {marker.data.controller}#{marker.data.action}',
|
28
52
|
data: [
|
29
53
|
{ key: "controller", format: "string" },
|
30
54
|
{ key: "action", format: "string" },
|
31
55
|
{ key: "status", format: "integer" },
|
32
56
|
{ key: "path", format: "string" },
|
33
|
-
{ key: "method", format: "string" }
|
57
|
+
{ key: "method", format: "string" },
|
58
|
+
{ key: "format", format: "string" }
|
34
59
|
]
|
35
60
|
},
|
36
61
|
{
|
37
62
|
name: "cache_read.active_support",
|
38
63
|
display: [ "marker-chart", "marker-table" ],
|
64
|
+
tooltipLabel: '{marker.data.super_operation} {marker.data.key}',
|
65
|
+
chartLabel: '{marker.data.super_operation} {marker.data.key}',
|
66
|
+
tableLabel: '{marker.data.super_operation} {marker.data.key}',
|
39
67
|
data: [
|
40
68
|
{ key: "key", format: "string" },
|
41
69
|
{ key: "store", format: "string" },
|
@@ -55,11 +83,65 @@ module Vernier
|
|
55
83
|
},
|
56
84
|
{
|
57
85
|
name: "cache_fetch_hit.active_support",
|
86
|
+
tooltipLabel: 'HIT {marker.data.key}',
|
87
|
+
chartLabel: 'HIT {marker.data.key}',
|
88
|
+
tableLabel: 'HIT {marker.data.key}',
|
58
89
|
display: [ "marker-chart", "marker-table" ],
|
59
90
|
data: [
|
60
91
|
{ key: "key", format: "string" },
|
61
92
|
{ key: "store", format: "string" }
|
62
93
|
]
|
94
|
+
},
|
95
|
+
{
|
96
|
+
name: "render_template.action_view",
|
97
|
+
display: [ "marker-chart", "marker-table" ],
|
98
|
+
tooltipLabel: '{marker.data.identifier}',
|
99
|
+
chartLabel: '{marker.data.identifier}',
|
100
|
+
tableLabel: '{marker.data.identifier}',
|
101
|
+
data: [
|
102
|
+
{ key: "identifier", format: "string" }
|
103
|
+
]
|
104
|
+
},
|
105
|
+
{
|
106
|
+
name: "render_layout.action_view",
|
107
|
+
display: [ "marker-chart", "marker-table" ],
|
108
|
+
tooltipLabel: '{marker.data.identifier}',
|
109
|
+
chartLabel: '{marker.data.identifier}',
|
110
|
+
tableLabel: '{marker.data.identifier}',
|
111
|
+
data: [
|
112
|
+
{ key: "identifier", format: "string" }
|
113
|
+
]
|
114
|
+
},
|
115
|
+
{
|
116
|
+
name: "render_partial.action_view",
|
117
|
+
display: [ "marker-chart", "marker-table" ],
|
118
|
+
tooltipLabel: '{marker.data.identifier}',
|
119
|
+
chartLabel: '{marker.data.identifier}',
|
120
|
+
tableLabel: '{marker.data.identifier}',
|
121
|
+
data: [
|
122
|
+
{ key: "identifier", format: "string" }
|
123
|
+
]
|
124
|
+
},
|
125
|
+
{
|
126
|
+
name: "render_collection.action_view",
|
127
|
+
display: [ "marker-chart", "marker-table" ],
|
128
|
+
tooltipLabel: '{marker.data.identifier}',
|
129
|
+
chartLabel: '{marker.data.identifier}',
|
130
|
+
tableLabel: '{marker.data.identifier}',
|
131
|
+
data: [
|
132
|
+
{ key: "identifier", format: "string" },
|
133
|
+
{ key: "count", format: "integer" }
|
134
|
+
]
|
135
|
+
},
|
136
|
+
{
|
137
|
+
name: "load_config_initializer.railties",
|
138
|
+
display: [ "marker-chart", "marker-table" ],
|
139
|
+
tooltipLabel: '{marker.data.initializer}',
|
140
|
+
chartLabel: '{marker.data.initializer}',
|
141
|
+
tableLabel: '{marker.data.initializer}',
|
142
|
+
data: [
|
143
|
+
{ key: "initializer", format: "string" }
|
144
|
+
]
|
63
145
|
}
|
64
146
|
])
|
65
147
|
|
@@ -152,7 +152,7 @@ module Vernier
|
|
152
152
|
[
|
153
153
|
{
|
154
154
|
name: "THREAD_RUNNING",
|
155
|
-
display: [ "marker-chart"
|
155
|
+
display: [ "marker-chart" ],
|
156
156
|
data: [
|
157
157
|
{
|
158
158
|
label: "Description",
|
@@ -162,7 +162,7 @@ module Vernier
|
|
162
162
|
},
|
163
163
|
{
|
164
164
|
name: "THREAD_STALLED",
|
165
|
-
display: [ "marker-chart"
|
165
|
+
display: [ "marker-chart" ],
|
166
166
|
data: [
|
167
167
|
{
|
168
168
|
label: "Description",
|
@@ -172,7 +172,7 @@ module Vernier
|
|
172
172
|
},
|
173
173
|
{
|
174
174
|
name: "THREAD_SUSPENDED",
|
175
|
-
display: [ "marker-chart"
|
175
|
+
display: [ "marker-chart" ],
|
176
176
|
data: [
|
177
177
|
{
|
178
178
|
label: "Description",
|
data/lib/vernier/thread_names.rb
CHANGED
data/lib/vernier/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vernier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Hawthorn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-04-
|
11
|
+
date: 2024-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
106
|
+
rubygems_version: 3.5.9
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: A next generation CRuby profiler
|