rack-mini-profiler 1.0.2 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +138 -21
- data/README.md +201 -94
- data/lib/enable_rails_patches.rb +5 -0
- data/lib/generators/rack_mini_profiler/USAGE +9 -0
- data/lib/generators/rack_mini_profiler/install_generator.rb +13 -0
- data/lib/generators/{rack_profiler/templates/rack_profiler.rb → rack_mini_profiler/templates/rack_mini_profiler.rb} +1 -1
- data/lib/generators/rack_profiler/install_generator.rb +6 -3
- data/lib/html/dot.1.1.2.min.js +2 -0
- data/lib/html/includes.css +144 -45
- data/lib/html/includes.js +1423 -1009
- data/lib/html/includes.scss +538 -441
- data/lib/html/includes.tmpl +231 -148
- data/lib/html/pretty-print.js +810 -0
- data/lib/html/profile_handler.js +1 -1
- data/lib/html/rack-mini-profiler.css +3 -0
- data/lib/html/rack-mini-profiler.js +2 -0
- data/lib/html/share.html +0 -1
- data/lib/html/speedscope/LICENSE +21 -0
- data/lib/html/speedscope/README.md +3 -0
- data/lib/html/speedscope/demangle-cpp.1768f4cc.js +4 -0
- data/lib/html/speedscope/favicon-16x16.f74b3187.png +0 -0
- data/lib/html/speedscope/favicon-32x32.bc503437.png +0 -0
- data/lib/html/speedscope/file-format-schema.json +324 -0
- data/lib/html/speedscope/fonts/source-code-pro-regular.css +8 -0
- data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff +0 -0
- data/lib/html/speedscope/fonts/source-code-pro-v13-regular.woff2 +0 -0
- data/lib/html/speedscope/import.cf0fa83f.js +115 -0
- data/lib/html/speedscope/index.html +2 -0
- data/lib/html/speedscope/release.txt +3 -0
- data/lib/html/speedscope/reset.8c46b7a1.css +2 -0
- data/lib/html/speedscope/source-map.438fa06b.js +24 -0
- data/lib/html/speedscope/speedscope.44364064.js +200 -0
- data/lib/html/vendor.js +848 -0
- data/lib/mini_profiler/asset_version.rb +3 -2
- data/lib/mini_profiler/client_settings.rb +15 -7
- data/lib/mini_profiler/config.rb +51 -5
- data/lib/mini_profiler/gc_profiler.rb +1 -1
- data/lib/mini_profiler/profiling_methods.rb +13 -8
- data/lib/mini_profiler/snapshots_transporter.rb +109 -0
- data/lib/mini_profiler/storage/abstract_store.rb +52 -1
- data/lib/mini_profiler/storage/file_store.rb +7 -3
- data/lib/mini_profiler/storage/memcache_store.rb +13 -7
- data/lib/mini_profiler/storage/memory_store.rb +98 -5
- data/lib/mini_profiler/storage/redis_store.rb +226 -3
- data/lib/mini_profiler/storage.rb +7 -0
- data/lib/mini_profiler/timer_struct/base.rb +2 -0
- data/lib/mini_profiler/timer_struct/custom.rb +1 -0
- data/lib/mini_profiler/timer_struct/page.rb +60 -4
- data/lib/mini_profiler/timer_struct/request.rb +53 -11
- data/lib/mini_profiler/timer_struct/sql.rb +6 -2
- data/lib/mini_profiler/timer_struct.rb +8 -0
- data/lib/mini_profiler/version.rb +2 -1
- data/lib/{mini_profiler/profiler.rb → mini_profiler.rb} +394 -82
- data/lib/mini_profiler_rails/railtie.rb +88 -7
- data/lib/mini_profiler_rails/railtie_methods.rb +61 -0
- data/lib/patches/db/activerecord.rb +1 -12
- data/lib/patches/db/mongo.rb +1 -1
- data/lib/patches/db/moped.rb +1 -1
- data/lib/patches/db/mysql2/alias_method.rb +30 -0
- data/lib/patches/db/mysql2/prepend.rb +34 -0
- data/lib/patches/db/mysql2.rb +4 -27
- data/lib/patches/db/plucky.rb +4 -4
- data/lib/patches/db/riak.rb +1 -1
- data/lib/patches/net_patches.rb +21 -10
- data/lib/patches/sql_patches.rb +13 -5
- data/lib/prepend_mysql2_patch.rb +5 -0
- data/lib/prepend_net_http_patch.rb +5 -0
- data/lib/rack-mini-profiler.rb +1 -24
- data/rack-mini-profiler.gemspec +17 -8
- metadata +156 -32
- data/lib/html/jquery.1.7.1.js +0 -4
- data/lib/html/jquery.tmpl.js +0 -486
- data/lib/html/list.css +0 -9
- data/lib/html/list.js +0 -38
- data/lib/html/list.tmpl +0 -34
@@ -0,0 +1,324 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
+
"definitions": {
|
4
|
+
"CloseFrameEvent": {
|
5
|
+
"properties": {
|
6
|
+
"at": {
|
7
|
+
"title": "at",
|
8
|
+
"type": "number"
|
9
|
+
},
|
10
|
+
"frame": {
|
11
|
+
"title": "frame",
|
12
|
+
"type": "number"
|
13
|
+
},
|
14
|
+
"type": {
|
15
|
+
"enum": [
|
16
|
+
"C"
|
17
|
+
],
|
18
|
+
"title": "type",
|
19
|
+
"type": "string"
|
20
|
+
}
|
21
|
+
},
|
22
|
+
"required": [
|
23
|
+
"at",
|
24
|
+
"frame",
|
25
|
+
"type"
|
26
|
+
],
|
27
|
+
"title": "CloseFrameEvent",
|
28
|
+
"type": "object"
|
29
|
+
},
|
30
|
+
"FileFormat.EventType": {
|
31
|
+
"enum": [
|
32
|
+
"C",
|
33
|
+
"O"
|
34
|
+
],
|
35
|
+
"title": "FileFormat.EventType",
|
36
|
+
"type": "string"
|
37
|
+
},
|
38
|
+
"FileFormat.EventedProfile": {
|
39
|
+
"properties": {
|
40
|
+
"endValue": {
|
41
|
+
"title": "endValue",
|
42
|
+
"type": "number"
|
43
|
+
},
|
44
|
+
"events": {
|
45
|
+
"items": {
|
46
|
+
"anyOf": [
|
47
|
+
{
|
48
|
+
"$ref": "#/definitions/OpenFrameEvent"
|
49
|
+
},
|
50
|
+
{
|
51
|
+
"$ref": "#/definitions/CloseFrameEvent"
|
52
|
+
}
|
53
|
+
]
|
54
|
+
},
|
55
|
+
"title": "events",
|
56
|
+
"type": "array"
|
57
|
+
},
|
58
|
+
"name": {
|
59
|
+
"title": "name",
|
60
|
+
"type": "string"
|
61
|
+
},
|
62
|
+
"startValue": {
|
63
|
+
"title": "startValue",
|
64
|
+
"type": "number"
|
65
|
+
},
|
66
|
+
"type": {
|
67
|
+
"enum": [
|
68
|
+
"evented"
|
69
|
+
],
|
70
|
+
"title": "type",
|
71
|
+
"type": "string"
|
72
|
+
},
|
73
|
+
"unit": {
|
74
|
+
"$ref": "#/definitions/FileFormat.ValueUnit",
|
75
|
+
"title": "unit"
|
76
|
+
}
|
77
|
+
},
|
78
|
+
"required": [
|
79
|
+
"endValue",
|
80
|
+
"events",
|
81
|
+
"name",
|
82
|
+
"startValue",
|
83
|
+
"type",
|
84
|
+
"unit"
|
85
|
+
],
|
86
|
+
"title": "FileFormat.EventedProfile",
|
87
|
+
"type": "object"
|
88
|
+
},
|
89
|
+
"FileFormat.File": {
|
90
|
+
"properties": {
|
91
|
+
"$schema": {
|
92
|
+
"enum": [
|
93
|
+
"https://www.speedscope.app/file-format-schema.json"
|
94
|
+
],
|
95
|
+
"title": "$schema",
|
96
|
+
"type": "string"
|
97
|
+
},
|
98
|
+
"activeProfileIndex": {
|
99
|
+
"title": "activeProfileIndex",
|
100
|
+
"type": "number"
|
101
|
+
},
|
102
|
+
"exporter": {
|
103
|
+
"title": "exporter",
|
104
|
+
"type": "string"
|
105
|
+
},
|
106
|
+
"name": {
|
107
|
+
"title": "name",
|
108
|
+
"type": "string"
|
109
|
+
},
|
110
|
+
"profiles": {
|
111
|
+
"items": {
|
112
|
+
"anyOf": [
|
113
|
+
{
|
114
|
+
"$ref": "#/definitions/FileFormat.EventedProfile"
|
115
|
+
},
|
116
|
+
{
|
117
|
+
"$ref": "#/definitions/FileFormat.SampledProfile"
|
118
|
+
}
|
119
|
+
]
|
120
|
+
},
|
121
|
+
"title": "profiles",
|
122
|
+
"type": "array"
|
123
|
+
},
|
124
|
+
"shared": {
|
125
|
+
"properties": {
|
126
|
+
"frames": {
|
127
|
+
"items": {
|
128
|
+
"$ref": "#/definitions/FileFormat.Frame"
|
129
|
+
},
|
130
|
+
"title": "frames",
|
131
|
+
"type": "array"
|
132
|
+
}
|
133
|
+
},
|
134
|
+
"required": [
|
135
|
+
"frames"
|
136
|
+
],
|
137
|
+
"title": "shared",
|
138
|
+
"type": "object"
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"required": [
|
142
|
+
"$schema",
|
143
|
+
"profiles",
|
144
|
+
"shared"
|
145
|
+
],
|
146
|
+
"title": "FileFormat.File",
|
147
|
+
"type": "object"
|
148
|
+
},
|
149
|
+
"FileFormat.Frame": {
|
150
|
+
"properties": {
|
151
|
+
"col": {
|
152
|
+
"title": "col",
|
153
|
+
"type": "number"
|
154
|
+
},
|
155
|
+
"file": {
|
156
|
+
"title": "file",
|
157
|
+
"type": "string"
|
158
|
+
},
|
159
|
+
"line": {
|
160
|
+
"title": "line",
|
161
|
+
"type": "number"
|
162
|
+
},
|
163
|
+
"name": {
|
164
|
+
"title": "name",
|
165
|
+
"type": "string"
|
166
|
+
}
|
167
|
+
},
|
168
|
+
"required": [
|
169
|
+
"name"
|
170
|
+
],
|
171
|
+
"title": "FileFormat.Frame",
|
172
|
+
"type": "object"
|
173
|
+
},
|
174
|
+
"FileFormat.IProfile": {
|
175
|
+
"properties": {
|
176
|
+
"type": {
|
177
|
+
"$ref": "#/definitions/FileFormat.ProfileType",
|
178
|
+
"title": "type"
|
179
|
+
}
|
180
|
+
},
|
181
|
+
"required": [
|
182
|
+
"type"
|
183
|
+
],
|
184
|
+
"title": "FileFormat.IProfile",
|
185
|
+
"type": "object"
|
186
|
+
},
|
187
|
+
"FileFormat.Profile": {
|
188
|
+
"anyOf": [
|
189
|
+
{
|
190
|
+
"$ref": "#/definitions/FileFormat.EventedProfile"
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"$ref": "#/definitions/FileFormat.SampledProfile"
|
194
|
+
}
|
195
|
+
]
|
196
|
+
},
|
197
|
+
"FileFormat.ProfileType": {
|
198
|
+
"enum": [
|
199
|
+
"evented",
|
200
|
+
"sampled"
|
201
|
+
],
|
202
|
+
"title": "FileFormat.ProfileType",
|
203
|
+
"type": "string"
|
204
|
+
},
|
205
|
+
"FileFormat.SampledProfile": {
|
206
|
+
"properties": {
|
207
|
+
"endValue": {
|
208
|
+
"title": "endValue",
|
209
|
+
"type": "number"
|
210
|
+
},
|
211
|
+
"name": {
|
212
|
+
"title": "name",
|
213
|
+
"type": "string"
|
214
|
+
},
|
215
|
+
"samples": {
|
216
|
+
"items": {
|
217
|
+
"items": {
|
218
|
+
"type": "number"
|
219
|
+
},
|
220
|
+
"type": "array"
|
221
|
+
},
|
222
|
+
"title": "samples",
|
223
|
+
"type": "array"
|
224
|
+
},
|
225
|
+
"startValue": {
|
226
|
+
"title": "startValue",
|
227
|
+
"type": "number"
|
228
|
+
},
|
229
|
+
"type": {
|
230
|
+
"enum": [
|
231
|
+
"sampled"
|
232
|
+
],
|
233
|
+
"title": "type",
|
234
|
+
"type": "string"
|
235
|
+
},
|
236
|
+
"unit": {
|
237
|
+
"$ref": "#/definitions/FileFormat.ValueUnit",
|
238
|
+
"title": "unit"
|
239
|
+
},
|
240
|
+
"weights": {
|
241
|
+
"items": {
|
242
|
+
"type": "number"
|
243
|
+
},
|
244
|
+
"title": "weights",
|
245
|
+
"type": "array"
|
246
|
+
}
|
247
|
+
},
|
248
|
+
"required": [
|
249
|
+
"endValue",
|
250
|
+
"name",
|
251
|
+
"samples",
|
252
|
+
"startValue",
|
253
|
+
"type",
|
254
|
+
"unit",
|
255
|
+
"weights"
|
256
|
+
],
|
257
|
+
"title": "FileFormat.SampledProfile",
|
258
|
+
"type": "object"
|
259
|
+
},
|
260
|
+
"FileFormat.ValueUnit": {
|
261
|
+
"enum": [
|
262
|
+
"bytes",
|
263
|
+
"microseconds",
|
264
|
+
"milliseconds",
|
265
|
+
"nanoseconds",
|
266
|
+
"none",
|
267
|
+
"seconds"
|
268
|
+
],
|
269
|
+
"title": "FileFormat.ValueUnit",
|
270
|
+
"type": "string"
|
271
|
+
},
|
272
|
+
"IEvent": {
|
273
|
+
"properties": {
|
274
|
+
"at": {
|
275
|
+
"title": "at",
|
276
|
+
"type": "number"
|
277
|
+
},
|
278
|
+
"type": {
|
279
|
+
"$ref": "#/definitions/FileFormat.EventType",
|
280
|
+
"title": "type"
|
281
|
+
}
|
282
|
+
},
|
283
|
+
"required": [
|
284
|
+
"at",
|
285
|
+
"type"
|
286
|
+
],
|
287
|
+
"title": "IEvent",
|
288
|
+
"type": "object"
|
289
|
+
},
|
290
|
+
"OpenFrameEvent": {
|
291
|
+
"properties": {
|
292
|
+
"at": {
|
293
|
+
"title": "at",
|
294
|
+
"type": "number"
|
295
|
+
},
|
296
|
+
"frame": {
|
297
|
+
"title": "frame",
|
298
|
+
"type": "number"
|
299
|
+
},
|
300
|
+
"type": {
|
301
|
+
"enum": [
|
302
|
+
"O"
|
303
|
+
],
|
304
|
+
"title": "type",
|
305
|
+
"type": "string"
|
306
|
+
}
|
307
|
+
},
|
308
|
+
"required": [
|
309
|
+
"at",
|
310
|
+
"frame",
|
311
|
+
"type"
|
312
|
+
],
|
313
|
+
"title": "OpenFrameEvent",
|
314
|
+
"type": "object"
|
315
|
+
},
|
316
|
+
"SampledStack": {
|
317
|
+
"items": {
|
318
|
+
"type": "number"
|
319
|
+
},
|
320
|
+
"type": "array"
|
321
|
+
}
|
322
|
+
},
|
323
|
+
"$ref": "#/definitions/FileFormat.File"
|
324
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: 'Source Code Pro';
|
3
|
+
font-style: normal;
|
4
|
+
font-weight: 400;
|
5
|
+
src: local(''),
|
6
|
+
url('./source-code-pro-v13-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
|
7
|
+
url('./source-code-pro-v13-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
|
8
|
+
}
|
Binary file
|
Binary file
|