activeinsights 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/assets/stylesheets/active_insights/application.css +396 -0
- data/app/assets/stylesheets/active_insights/calibre-bold.woff2 +0 -0
- data/app/assets/stylesheets/active_insights/calibre-regular-italic.woff2 +0 -0
- data/app/assets/stylesheets/active_insights/calibre-regular.woff2 +0 -0
- data/app/assets/stylesheets/active_insights/calibre-semibold-italic.woff2 +0 -0
- data/app/assets/stylesheets/active_insights/calibre-semibold.woff2 +0 -0
- data/app/controllers/active_insights/jobs_p_values_controller.rb +11 -0
- data/app/controllers/active_insights/requests_p_values_controller.rb +11 -0
- data/app/models/active_insights/request.rb +4 -0
- data/app/views/active_insights/jobs/index.html.erb +7 -7
- data/app/views/active_insights/jobs_latencies/index.html.erb +5 -14
- data/app/views/active_insights/jobs_p_values/index.html.erb +20 -15
- data/app/views/active_insights/jpm/index.html.erb +6 -15
- data/app/views/active_insights/requests/index.html.erb +8 -6
- data/app/views/active_insights/requests_p_values/index.html.erb +21 -16
- data/app/views/active_insights/rpm/index.html.erb +6 -15
- data/app/views/layouts/active_insights/application.html.erb +11 -339
- data/config/initializers/importmap.rb +3 -2
- data/lib/active_insights/engine.rb +1 -1
- data/lib/active_insights/seeders/jobs.rb +5 -1
- data/lib/active_insights/seeders/requests.rb +5 -1
- data/lib/active_insights/version.rb +1 -1
- metadata +12 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e21f51380257d374bfb3f74d006a2123a722ca864bf1e369512fc9e4c6dda903
|
4
|
+
data.tar.gz: bbe3b3f8ce4ead3694eaa95b4ac6fde74dff9eea40cbd5ae26adc79bb690393b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5508290b981d052175899002bd7cc9b7a4e3793d84ac01ced88a524fd25bf5442545607e28989c25fc9cf31c2c9e898cc1c9f73e92e4f6c811c332064f7649a1
|
7
|
+
data.tar.gz: 497aa561b86eb8b1fbc7f930dde745b009dafcb447f37339b8747c19a56888ebd0f60b433b3a8f2fe3f07317c588b52405a74feb00e9ab0ec6035f39433a4daf
|
data/README.md
CHANGED
@@ -0,0 +1,396 @@
|
|
1
|
+
@font-face {
|
2
|
+
font-family: 'Calibre';
|
3
|
+
font-style: normal;
|
4
|
+
font-weight: 400;
|
5
|
+
src: url('./calibre-regular.woff2') format('woff2');
|
6
|
+
font-display: swap;
|
7
|
+
}
|
8
|
+
|
9
|
+
@font-face {
|
10
|
+
font-family: 'Calibre';
|
11
|
+
font-style: italic;
|
12
|
+
font-weight: 400;
|
13
|
+
src: url('./calibre-regular-italic.woff2') format('woff2');
|
14
|
+
font-display: swap;
|
15
|
+
}
|
16
|
+
|
17
|
+
@font-face {
|
18
|
+
font-family: 'Calibre';
|
19
|
+
font-style: normal;
|
20
|
+
font-weight: 600;
|
21
|
+
src: url('./calibre-semibold.woff2') format('woff2');
|
22
|
+
font-display: swap;
|
23
|
+
}
|
24
|
+
|
25
|
+
@font-face {
|
26
|
+
font-family: 'Calibre';
|
27
|
+
font-style: italic;
|
28
|
+
font-weight: 600;
|
29
|
+
src: url('./calibre-semibold-italic.woff2') format('woff2');
|
30
|
+
font-display: swap;
|
31
|
+
}
|
32
|
+
|
33
|
+
@font-face {
|
34
|
+
font-family: 'Calibre';
|
35
|
+
font-style: normal;
|
36
|
+
font-weight: 700;
|
37
|
+
src: url('./calibre-bold.woff2') format('woff2');
|
38
|
+
font-display: swap;
|
39
|
+
}
|
40
|
+
|
41
|
+
body {
|
42
|
+
background-color: #fff;
|
43
|
+
color: #333;
|
44
|
+
color-scheme: light dark;
|
45
|
+
supported-color-schemes: light dark;
|
46
|
+
margin: 0px;
|
47
|
+
}
|
48
|
+
|
49
|
+
body, p, ol, ul, td, input {
|
50
|
+
font-family: helvetica, verdana, arial, sans-serif;
|
51
|
+
font-size: 15px;
|
52
|
+
line-height: 18px;
|
53
|
+
}
|
54
|
+
|
55
|
+
form {
|
56
|
+
margin-bottom: 0px;
|
57
|
+
}
|
58
|
+
|
59
|
+
pre {
|
60
|
+
font-size: 11px;
|
61
|
+
white-space: pre-wrap;
|
62
|
+
}
|
63
|
+
|
64
|
+
pre.box {
|
65
|
+
border: 1px solid #EEE;
|
66
|
+
padding: 10px;
|
67
|
+
margin: 0px;
|
68
|
+
width: 958px;
|
69
|
+
}
|
70
|
+
|
71
|
+
header {
|
72
|
+
color: #D30001;
|
73
|
+
background: rgb(238, 231, 233);
|
74
|
+
padding: 0.5em 1.5em;
|
75
|
+
display: flex;
|
76
|
+
flex-direction: row;
|
77
|
+
justify-content: space-between;
|
78
|
+
align-items: center;
|
79
|
+
}
|
80
|
+
|
81
|
+
.tooltip {
|
82
|
+
background: rgb(238, 231, 233);
|
83
|
+
}
|
84
|
+
|
85
|
+
header h1 {
|
86
|
+
font-family: 'Calibre';
|
87
|
+
}
|
88
|
+
|
89
|
+
h1 {
|
90
|
+
overflow-wrap: break-word;
|
91
|
+
margin: 0.2em 0;
|
92
|
+
line-height: 1.1em;
|
93
|
+
font-size: 2em;
|
94
|
+
}
|
95
|
+
|
96
|
+
h2 {
|
97
|
+
color: #C00;
|
98
|
+
line-height: 25px;
|
99
|
+
}
|
100
|
+
|
101
|
+
code.traces {
|
102
|
+
font-size: 11px;
|
103
|
+
}
|
104
|
+
|
105
|
+
.response-heading, .request-heading {
|
106
|
+
margin-top: 30px;
|
107
|
+
}
|
108
|
+
|
109
|
+
.exception-message {
|
110
|
+
padding: 8px 0;
|
111
|
+
}
|
112
|
+
|
113
|
+
.exception-message .message {
|
114
|
+
margin-bottom: 8px;
|
115
|
+
line-height: 25px;
|
116
|
+
font-size: 1.5em;
|
117
|
+
font-weight: bold;
|
118
|
+
color: #C00;
|
119
|
+
}
|
120
|
+
|
121
|
+
.details {
|
122
|
+
border: 1px solid #D0D0D0;
|
123
|
+
border-radius: 4px;
|
124
|
+
margin: 1em 0px;
|
125
|
+
display: block;
|
126
|
+
max-width: 978px;
|
127
|
+
}
|
128
|
+
|
129
|
+
.summary {
|
130
|
+
padding: 8px 15px;
|
131
|
+
border-bottom: 1px solid #D0D0D0;
|
132
|
+
display: block;
|
133
|
+
}
|
134
|
+
|
135
|
+
a.summary {
|
136
|
+
color: #F0F0F0;
|
137
|
+
text-decoration: none;
|
138
|
+
background: #C52F24;
|
139
|
+
border-bottom: none;
|
140
|
+
}
|
141
|
+
|
142
|
+
.details pre {
|
143
|
+
margin: 5px;
|
144
|
+
border: none;
|
145
|
+
}
|
146
|
+
|
147
|
+
#container {
|
148
|
+
box-sizing: border-box;
|
149
|
+
width: 100%;
|
150
|
+
padding: 0 1.5em;
|
151
|
+
}
|
152
|
+
|
153
|
+
.source * {
|
154
|
+
margin: 0px;
|
155
|
+
padding: 0px;
|
156
|
+
}
|
157
|
+
|
158
|
+
.source {
|
159
|
+
border: 1px solid #D9D9D9;
|
160
|
+
background: #ECECEC;
|
161
|
+
max-width: 978px;
|
162
|
+
}
|
163
|
+
|
164
|
+
.source pre {
|
165
|
+
padding: 10px 0px;
|
166
|
+
border: none;
|
167
|
+
}
|
168
|
+
|
169
|
+
.source .data {
|
170
|
+
font-size: 80%;
|
171
|
+
overflow: auto;
|
172
|
+
background-color: #FFF;
|
173
|
+
}
|
174
|
+
|
175
|
+
.info {
|
176
|
+
padding: 0.5em;
|
177
|
+
}
|
178
|
+
|
179
|
+
.source .data .line_numbers {
|
180
|
+
background-color: #ECECEC;
|
181
|
+
color: #555;
|
182
|
+
padding: 1em .5em;
|
183
|
+
border-right: 1px solid #DDD;
|
184
|
+
text-align: right;
|
185
|
+
}
|
186
|
+
|
187
|
+
.line {
|
188
|
+
padding-left: 10px;
|
189
|
+
white-space: pre;
|
190
|
+
}
|
191
|
+
|
192
|
+
.line:hover {
|
193
|
+
background-color: #F6F6F6;
|
194
|
+
}
|
195
|
+
|
196
|
+
.line.active {
|
197
|
+
background-color: #FCC;
|
198
|
+
}
|
199
|
+
|
200
|
+
.error_highlight {
|
201
|
+
display: inline-block;
|
202
|
+
background-color: #FF9;
|
203
|
+
text-decoration: #F00 wavy underline;
|
204
|
+
}
|
205
|
+
|
206
|
+
.error_highlight_tip {
|
207
|
+
color: #666;
|
208
|
+
padding: 2px 2px;
|
209
|
+
font-size: 10px;
|
210
|
+
}
|
211
|
+
|
212
|
+
.button_to {
|
213
|
+
display: inline-block;
|
214
|
+
margin-top: 0.75em;
|
215
|
+
margin-bottom: 0.75em;
|
216
|
+
}
|
217
|
+
|
218
|
+
.hidden {
|
219
|
+
display: none;
|
220
|
+
}
|
221
|
+
|
222
|
+
.red {
|
223
|
+
color: #D30001;
|
224
|
+
}
|
225
|
+
|
226
|
+
.calibre {
|
227
|
+
font-family: 'Calibre';
|
228
|
+
}
|
229
|
+
|
230
|
+
.link {
|
231
|
+
color: #261B23;
|
232
|
+
font-size: 20px;
|
233
|
+
&:hover {
|
234
|
+
color: #D30001;
|
235
|
+
}
|
236
|
+
}
|
237
|
+
|
238
|
+
.datepicker {
|
239
|
+
background-color: #D30001;
|
240
|
+
border-radius: 9999px;
|
241
|
+
padding-left: 15px;
|
242
|
+
padding-right: 15px;
|
243
|
+
padding-top: 5px;
|
244
|
+
padding-bottom: 5px;
|
245
|
+
border: none;
|
246
|
+
cursor: pointer;
|
247
|
+
}
|
248
|
+
|
249
|
+
.correction {
|
250
|
+
list-style-type: none;
|
251
|
+
}
|
252
|
+
|
253
|
+
input[type="submit"] {
|
254
|
+
color: white;
|
255
|
+
background-color: #C00;
|
256
|
+
border: none;
|
257
|
+
border-radius: 12px;
|
258
|
+
box-shadow: 0 3px #F99;
|
259
|
+
font-size: 13px;
|
260
|
+
font-weight: bold;
|
261
|
+
margin: 0;
|
262
|
+
padding: 10px 18px;
|
263
|
+
cursor: pointer;
|
264
|
+
-webkit-appearance: none;
|
265
|
+
}
|
266
|
+
input[type="submit"]:focus,
|
267
|
+
input[type="submit"]:hover {
|
268
|
+
opacity: 0.8;
|
269
|
+
}
|
270
|
+
input[type="submit"]:active {
|
271
|
+
box-shadow: 0 2px #F99;
|
272
|
+
transform: translateY(1px)
|
273
|
+
}
|
274
|
+
|
275
|
+
a.trace-frames {
|
276
|
+
color: #666;
|
277
|
+
overflow-wrap: break-word;
|
278
|
+
}
|
279
|
+
a:hover, a.trace-frames.selected { color: #C00; }
|
280
|
+
a.summary:hover { color: #FFF; }
|
281
|
+
|
282
|
+
table {
|
283
|
+
margin: 0;
|
284
|
+
border-collapse: collapse;
|
285
|
+
word-wrap:break-word;
|
286
|
+
table-layout: auto;
|
287
|
+
width: 100%;
|
288
|
+
margin-top: 50px;
|
289
|
+
}
|
290
|
+
|
291
|
+
table thead tr {
|
292
|
+
border-bottom: 3px solid rgba(38,27,35,0.1);
|
293
|
+
}
|
294
|
+
|
295
|
+
table th {
|
296
|
+
padding-left: 30px;
|
297
|
+
text-align: left;
|
298
|
+
font-family: 'Calibre';
|
299
|
+
font-size: 20px;
|
300
|
+
}
|
301
|
+
|
302
|
+
table tbody tr {
|
303
|
+
border-bottom: 3px solid rgba(38,27,35,0.1);
|
304
|
+
td {
|
305
|
+
font-family: 'Calibre';
|
306
|
+
font-size: 20px;
|
307
|
+
|
308
|
+
a {
|
309
|
+
color: #261B23;
|
310
|
+
&:hover {
|
311
|
+
color: #D30001;
|
312
|
+
}
|
313
|
+
}
|
314
|
+
}
|
315
|
+
}
|
316
|
+
|
317
|
+
table tbody tr:nth-child(odd) {
|
318
|
+
background: rgb(238, 231, 233);
|
319
|
+
}
|
320
|
+
|
321
|
+
table td {
|
322
|
+
padding: 10px 30px;
|
323
|
+
}
|
324
|
+
|
325
|
+
.pl-30px {
|
326
|
+
padding-left: 30px;
|
327
|
+
}
|
328
|
+
|
329
|
+
.pt-30px {
|
330
|
+
padding-top: 30px;
|
331
|
+
}
|
332
|
+
|
333
|
+
.flex {
|
334
|
+
display: flex;
|
335
|
+
}
|
336
|
+
|
337
|
+
.flex-col {
|
338
|
+
flex-direction: column;
|
339
|
+
}
|
340
|
+
.flex-row {
|
341
|
+
flex-direction: row;
|
342
|
+
}
|
343
|
+
.justify-around {
|
344
|
+
justify-content: space-around;
|
345
|
+
}
|
346
|
+
|
347
|
+
.justify-center {
|
348
|
+
justify-content: center;
|
349
|
+
}
|
350
|
+
.items-center {
|
351
|
+
align-items: center;
|
352
|
+
}
|
353
|
+
.font-size-30 {
|
354
|
+
font-size: 30px;
|
355
|
+
line-height: 30px;
|
356
|
+
}
|
357
|
+
.no-underline {
|
358
|
+
text-decoration: none;
|
359
|
+
}
|
360
|
+
.p-16px {
|
361
|
+
padding: 16px;
|
362
|
+
}
|
363
|
+
|
364
|
+
a.white {
|
365
|
+
color: #fff;
|
366
|
+
}
|
367
|
+
.mr-15px {
|
368
|
+
margin-right: 15px;
|
369
|
+
}
|
370
|
+
.button {
|
371
|
+
transition: all 0.25s cubic-bezier(0.33, 1, 0.68, 1);
|
372
|
+
padding: 5px 20px;
|
373
|
+
border-radius: 6px;
|
374
|
+
|
375
|
+
&:hover {
|
376
|
+
background: #F0E7E9;
|
377
|
+
}
|
378
|
+
}
|
379
|
+
.relative {
|
380
|
+
position: relative;
|
381
|
+
}
|
382
|
+
.absolute {
|
383
|
+
position: absolute;
|
384
|
+
}
|
385
|
+
.h-400px {
|
386
|
+
height: 400px;
|
387
|
+
}
|
388
|
+
.h-100 {
|
389
|
+
height: 100%;
|
390
|
+
}
|
391
|
+
.text-center {
|
392
|
+
text-align: center;
|
393
|
+
}
|
394
|
+
.w-175px {
|
395
|
+
width: 175px;
|
396
|
+
}
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -6,6 +6,8 @@ module ActiveInsights
|
|
6
6
|
@p50 = minutes.map{ |minute| [minute.pretty_started_at, minute.p50] }
|
7
7
|
@p95 = minutes.map{ |minute| [minute.pretty_started_at, minute.p95] }
|
8
8
|
@p99 = minutes.map{ |minute| [minute.pretty_started_at, minute.p99] }
|
9
|
+
|
10
|
+
fetch_jpm
|
9
11
|
end
|
10
12
|
|
11
13
|
def redirection
|
@@ -29,5 +31,14 @@ module ActiveInsights
|
|
29
31
|
def job
|
30
32
|
params[:job].presence
|
31
33
|
end
|
34
|
+
|
35
|
+
def fetch_jpm
|
36
|
+
return if job.blank?
|
37
|
+
|
38
|
+
@jpm =
|
39
|
+
minutes.select("COUNT(id) AS jpm").map do |minute|
|
40
|
+
[minute.started_at.strftime("%-l:%M%P"), minute.jpm]
|
41
|
+
end
|
42
|
+
end
|
32
43
|
end
|
33
44
|
end
|
@@ -6,6 +6,8 @@ module ActiveInsights
|
|
6
6
|
@p50 = minutes.map{ |minute| [minute.pretty_started_at, minute.p50] }
|
7
7
|
@p95 = minutes.map{ |minute| [minute.pretty_started_at, minute.p95] }
|
8
8
|
@p99 = minutes.map{ |minute| [minute.pretty_started_at, minute.p99] }
|
9
|
+
|
10
|
+
fetch_rpm
|
9
11
|
end
|
10
12
|
|
11
13
|
def redirection
|
@@ -31,5 +33,14 @@ module ActiveInsights
|
|
31
33
|
def formatted_controller
|
32
34
|
params[:formatted_controller].presence
|
33
35
|
end
|
36
|
+
|
37
|
+
def fetch_rpm
|
38
|
+
return if formatted_controller.blank?
|
39
|
+
|
40
|
+
@rpm =
|
41
|
+
minutes.select("COUNT(id) AS rpm").map do |minute|
|
42
|
+
[minute.started_at.strftime("%-l:%M%P"), minute.rpm]
|
43
|
+
end
|
44
|
+
end
|
34
45
|
end
|
35
46
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<header>
|
2
2
|
<h1>Metrics for <%= display_date(@date.first) %></h1>
|
3
3
|
<div class="flex flex-row items-center">
|
4
|
-
<%= link_to "View request metrics", active_insights.requests_path, class: "
|
4
|
+
<%= link_to "View request metrics", active_insights.requests_path, class: "link calibre mr-15px" %>
|
5
5
|
|
6
6
|
<%= form_with url: active_insights.jobs_path, method: :get do |f| %>
|
7
|
-
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
|
7
|
+
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
|
8
8
|
<% f.submit "submit", class: "hidden" %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
@@ -12,27 +12,27 @@
|
|
12
12
|
|
13
13
|
<div class="pl-30px pt-30px flex flex-row justify-around font-size-30">
|
14
14
|
<% @jobs.flat_map(&:parsed_durations).tap do |durations| %>
|
15
|
-
<%= link_to jpm_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
15
|
+
<%= link_to jpm_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
16
16
|
<div><%= per_minute(durations.size, (@date.last - @date.first).seconds) %></div>
|
17
17
|
<b>JPM</b>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%= link_to jobs_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
20
|
+
<%= link_to jobs_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
21
21
|
<div><%= p50(durations) %> ms</div>
|
22
22
|
<b>p50</b>
|
23
23
|
<% end %>
|
24
24
|
|
25
|
-
<%= link_to jobs_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
25
|
+
<%= link_to jobs_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
26
26
|
<div><%= p95(durations) %> ms</div>
|
27
27
|
<b>p95</b>
|
28
28
|
<% end %>
|
29
29
|
|
30
|
-
<%= link_to jobs_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
30
|
+
<%= link_to jobs_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
31
31
|
<div><%= p99(durations) %> ms</div>
|
32
32
|
<b>p99</b>
|
33
33
|
<% end %>
|
34
34
|
|
35
|
-
<%= link_to jobs_latency_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
35
|
+
<%= link_to jobs_latency_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
36
36
|
<div><%= @latency.to_f.round(1) %> ms</div>
|
37
37
|
<b>Latency</b>
|
38
38
|
<% end %>
|
@@ -2,26 +2,17 @@
|
|
2
2
|
<h1>Job Latency for <%= display_date(@date.first) %> (in ms)</h1>
|
3
3
|
|
4
4
|
<%= form_with url: active_insights.jobs_latency_redirection_path, method: :get do |f| %>
|
5
|
-
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
|
5
|
+
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
|
6
6
|
<% f.submit "submit", class: "hidden" %>
|
7
7
|
<% end %>
|
8
8
|
</header>
|
9
9
|
|
10
10
|
<div class="p-16px">
|
11
|
-
<%= column_chart @latencies, height: "
|
11
|
+
<%= column_chart @latencies, height: "400px", colors: ["#C00"], library: {
|
12
12
|
borderSkipped: true, barPercentage: 1, categoryPercentage: 1,
|
13
|
-
plugins: { zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: '
|
13
|
+
plugins: { tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
|
14
14
|
scales: {
|
15
|
-
x: { barPercentage: 1.0, autoSkip: false, display:
|
16
|
-
y: { grid: { display: false }, ticks: { color: "
|
15
|
+
x: { border: { color: "rgb(238, 231, 233)" }, barPercentage: 1.0, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
|
16
|
+
y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@latencies.map(&:second).min.to_f * 0.98).ceil, max: (@latencies.map(&:second).max) }
|
17
17
|
} } %>
|
18
18
|
</div>
|
19
|
-
|
20
|
-
<script>
|
21
|
-
document.addEventListener('keydown',(event) => {
|
22
|
-
const chart = Chartkick.charts[Object.keys(Chartkick.charts)[0]].getChartObject()
|
23
|
-
if (event.key === 'Escape' || event.key === 'Esc') {
|
24
|
-
chart.resetZoom()
|
25
|
-
}
|
26
|
-
});
|
27
|
-
</script>
|
@@ -1,32 +1,37 @@
|
|
1
1
|
<header>
|
2
2
|
<% if params[:job].present? %>
|
3
|
-
<h1><%= params[:job] %> metrics for <%= display_date(@date.first)
|
3
|
+
<h1><%= params[:job] %> metrics for <%= display_date(@date.first) %></h1>
|
4
4
|
<% else %>
|
5
5
|
<h1>Job Metrics for <%= display_date(@date.first) %> (in ms)</h1>
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<%= form_with url: active_insights.jobs_p_values_redirection_path, method: :get do |f| %>
|
9
9
|
<%= f.hidden_field :job, value: params[:job] %>
|
10
|
-
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
|
10
|
+
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
|
11
11
|
<% f.submit "submit", class: "hidden" %>
|
12
12
|
<% end %>
|
13
13
|
</header>
|
14
14
|
|
15
|
-
<div class="p-16px">
|
16
|
-
|
17
|
-
|
15
|
+
<div class="p-16px flex items-center">
|
16
|
+
<h1 class="red calibre text-center w-175px">Response Times <br> (in ms)</h1>
|
17
|
+
<%= line_chart [{ name: "p50", data: @p50 }, { name: "p95", data: @p95 }, { name: "p99", data: @p99 }], height: "500px", colors: ["#C00", "rgb(223, 180, 115)", "#000"], library: {
|
18
|
+
plugins: { legend: { position: "bottom" }, tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
|
18
19
|
elements: { point: { radius: 0 } },
|
19
20
|
scales: {
|
20
|
-
x: { autoSkip: false, display:
|
21
|
-
y: { grid: { display: false }, ticks: { color: "
|
21
|
+
x: { border: { color: "rgb(238, 231, 233)" }, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
|
22
|
+
y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@p50.map(&:second).min.to_f * 0.98).ceil, max: (@p99.map(&:second).max) }
|
22
23
|
} } %>
|
23
24
|
</div>
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
<% if @jpm %>
|
27
|
+
<div class="p-16px flex items-center">
|
28
|
+
<h1 class="red calibre text-center w-175px">JPM</h1>
|
29
|
+
<%= column_chart @jpm, height: "400px", colors: ["#C00"], library: {
|
30
|
+
borderSkipped: true, barPercentage: 1, categoryPercentage: 1,
|
31
|
+
plugins: { tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
|
32
|
+
scales: {
|
33
|
+
x: { border: { color: "rgb(238, 231, 233)" }, barPercentage: 1.0, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
|
34
|
+
y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@jpm.map(&:second).min.to_f * 0.98).ceil, max: (@jpm.map(&:second).max) }
|
35
|
+
} } %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
@@ -1,26 +1,17 @@
|
|
1
1
|
<header>
|
2
2
|
<h1>JPM Metrics for <%= display_date(@date.first) %></h1>
|
3
3
|
<%= form_with url: active_insights.jpm_redirection_path, method: :get do |f| %>
|
4
|
-
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
|
4
|
+
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
|
5
5
|
<% f.submit "submit", class: "hidden" %>
|
6
6
|
<% end %>
|
7
7
|
</header>
|
8
8
|
|
9
|
-
<div class="p-16px">
|
10
|
-
<%= column_chart @minutes, height: "
|
9
|
+
<div class="p-16px flex items-center h-100">
|
10
|
+
<%= column_chart @minutes, height: "400px", colors: ["#C00"], library: {
|
11
11
|
borderSkipped: true, barPercentage: 1, categoryPercentage: 1,
|
12
|
-
plugins: { zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: '
|
12
|
+
plugins: { tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
|
13
13
|
scales: {
|
14
|
-
x: { barPercentage: 1.0, autoSkip: false, display:
|
15
|
-
y: { grid: { display: false }, ticks: { color: "
|
14
|
+
x: { border: { color: "rgb(238, 231, 233)" }, barPercentage: 1.0, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
|
15
|
+
y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@minutes.map(&:second).min.to_f * 0.98).ceil, max: (@minutes.map(&:second).max) }
|
16
16
|
} } %>
|
17
17
|
</div>
|
18
|
-
|
19
|
-
<script>
|
20
|
-
document.addEventListener('keydown',(event) => {
|
21
|
-
const chart = Chartkick.charts[Object.keys(Chartkick.charts)[0]].getChartObject()
|
22
|
-
if (event.key === 'Escape' || event.key === 'Esc') {
|
23
|
-
chart.resetZoom()
|
24
|
-
}
|
25
|
-
});
|
26
|
-
</script>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<header>
|
2
2
|
<h1>Metrics for <%= display_date(@date.first) %></h1>
|
3
3
|
<div class="flex flex-row items-center">
|
4
|
-
<%= link_to "View job metrics", active_insights.jobs_path, class: "
|
4
|
+
<%= link_to "View job metrics", active_insights.jobs_path, class: "link calibre mr-15px" %>
|
5
5
|
|
6
6
|
<%= form_with url: active_insights.requests_path, method: :get do |f| %>
|
7
|
-
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
|
7
|
+
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
|
8
8
|
<% f.submit "submit", class: "hidden" %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
@@ -12,22 +12,22 @@
|
|
12
12
|
|
13
13
|
<div class="pl-30px pt-30px flex flex-row justify-around font-size-30">
|
14
14
|
<% @requests.flat_map(&:parsed_durations).tap do |durations| %>
|
15
|
-
<%= link_to rpm_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
15
|
+
<%= link_to rpm_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
16
16
|
<div><%= per_minute(durations.size, (@date.last - @date.first).seconds) %></div>
|
17
17
|
<b>RPM</b>
|
18
18
|
<% end %>
|
19
19
|
|
20
|
-
<%= link_to requests_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
20
|
+
<%= link_to requests_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
21
21
|
<div><%= p50(durations) %> ms</div>
|
22
22
|
<b>p50</b>
|
23
23
|
<% end %>
|
24
24
|
|
25
|
-
<%= link_to requests_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
25
|
+
<%= link_to requests_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
26
26
|
<div><%= p95(durations) %> ms</div>
|
27
27
|
<b>p95</b>
|
28
28
|
<% end %>
|
29
29
|
|
30
|
-
<%= link_to requests_p_values_path(@date.first.to_date), class: "flex flex-col justify-center items-center no-underline" do %>
|
30
|
+
<%= link_to requests_p_values_path(@date.first.to_date), class: "button calibre red flex flex-col justify-center items-center no-underline" do %>
|
31
31
|
<div><%= p99(durations) %> ms</div>
|
32
32
|
<b>p99</b>
|
33
33
|
<% end %>
|
@@ -39,6 +39,7 @@
|
|
39
39
|
<tr>
|
40
40
|
<th>Controller</th>
|
41
41
|
<th>RPM</th>
|
42
|
+
<th>%</th>
|
42
43
|
<th>p50</th>
|
43
44
|
<th>p95</th>
|
44
45
|
<th>p99</th>
|
@@ -49,6 +50,7 @@
|
|
49
50
|
<tr>
|
50
51
|
<td><%= link_to model.formatted_controller, controller_p_values_path(@date.first.to_date, model.formatted_controller) %></td>
|
51
52
|
<td><%= per_minute(model.parsed_durations.size, (@date.last - @date.first).seconds) %></td>
|
53
|
+
<td><%= number_to_percentage model.percentage(@requests.excluding(model)), precision: 1 %></td>
|
52
54
|
<td><%= model.p50 %> ms</td>
|
53
55
|
<td><%= model.p95 %> ms</td>
|
54
56
|
<td><%= model.p99 %> ms</td>
|
@@ -1,32 +1,37 @@
|
|
1
1
|
<header>
|
2
2
|
<% if params[:formatted_controller].present? %>
|
3
|
-
<h1><%= params[:formatted_controller] %> metrics for <%= display_date(@date.first)
|
3
|
+
<h1><%= params[:formatted_controller] %> metrics for <%= display_date(@date.first) %></h1>
|
4
4
|
<% else %>
|
5
|
-
<h1>Response Metrics for <%= display_date(@date.first)
|
5
|
+
<h1>Response Metrics for <%= display_date(@date.first) %></h1>
|
6
6
|
<% end %>
|
7
7
|
|
8
8
|
<%= form_with url: active_insights.requests_p_values_redirection_path, method: :get do |f| %>
|
9
9
|
<%= f.hidden_field :formatted_controller, value: params[:formatted_controller] %>
|
10
|
-
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
|
10
|
+
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
|
11
11
|
<% f.submit "submit", class: "hidden" %>
|
12
12
|
<% end %>
|
13
13
|
</header>
|
14
14
|
|
15
|
-
<div class="p-16px">
|
16
|
-
|
17
|
-
|
15
|
+
<div class="p-16px flex items-center">
|
16
|
+
<h1 class="red calibre text-center w-175px">Response Times <br> (in ms)</h1>
|
17
|
+
<%= line_chart [{ name: "p50", data: @p50 }, { name: "p95", data: @p95 }, { name: "p99", data: @p99 }], height: "500px", colors: ["#C00", "rgb(223, 180, 115)", "#000"], library: {
|
18
|
+
plugins: { legend: { position: "bottom" }, tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
|
18
19
|
elements: { point: { radius: 0 } },
|
19
20
|
scales: {
|
20
|
-
x: { autoSkip: false, display:
|
21
|
-
y: { grid: { display: false }, ticks: { color: "
|
21
|
+
x: { border: { color: "rgb(238, 231, 233)" }, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
|
22
|
+
y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@p50.map(&:second).min.to_f * 0.98).ceil, max: (@p99.map(&:second).max) }
|
22
23
|
} } %>
|
23
24
|
</div>
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
<% if @rpm %>
|
27
|
+
<div class="p-16px flex items-center">
|
28
|
+
<h1 class="red calibre text-center w-175px">RPM</h1>
|
29
|
+
<%= column_chart @rpm, height: "400px", colors: ["#C00"], library: {
|
30
|
+
borderSkipped: true, barPercentage: 1, categoryPercentage: 1,
|
31
|
+
plugins: { tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
|
32
|
+
scales: {
|
33
|
+
x: { border: { color: "rgb(238, 231, 233)" }, barPercentage: 1.0, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
|
34
|
+
y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@rpm.map(&:second).min.to_f * 0.98).ceil, max: (@rpm.map(&:second).max) }
|
35
|
+
} } %>
|
36
|
+
</div>
|
37
|
+
<% end %>
|
@@ -1,26 +1,17 @@
|
|
1
1
|
<header>
|
2
2
|
<h1>RPM Metrics for <%= display_date(@date.first) %></h1>
|
3
3
|
<%= form_with url: active_insights.rpm_redirection_path, method: :get do |f| %>
|
4
|
-
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", value: @date.first.to_date %>
|
4
|
+
<%= f.date_field :date, max: Date.current, onchange: "this.form.submit()", class: "datepicker", value: @date.first.to_date %>
|
5
5
|
<% f.submit "submit", class: "hidden" %>
|
6
6
|
<% end %>
|
7
7
|
</header>
|
8
8
|
|
9
|
-
<div class="p-16px">
|
10
|
-
<%= column_chart @minutes, height: "
|
9
|
+
<div class="p-16px flex items-center h-100">
|
10
|
+
<%= column_chart @minutes, height: "400px", colors: ["#C00"], library: {
|
11
11
|
borderSkipped: true, barPercentage: 1, categoryPercentage: 1,
|
12
|
-
plugins: { zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: '
|
12
|
+
plugins: { tooltip: { backgroundColor: 'rgb(238, 231, 233)', cornerRadius: 5, bodyColor: "#000", bodyAlign: 'center', bodyFont: { size: 20, family: "Calibre" }, titleColor: "#000", titleFont: { size: 20, family: "Calibre" } }, zoom: { zoom: { wheel: { enabled: false }, drag: { enabled: true, backgroundColor: 'rgb(238, 231, 233)' }, mode: 'x' } } },
|
13
13
|
scales: {
|
14
|
-
x: { barPercentage: 1.0, autoSkip: false, display:
|
15
|
-
y: { grid: { display: false }, ticks: { color: "
|
14
|
+
x: { border: { color: "rgb(238, 231, 233)" }, barPercentage: 1.0, grid: { color: "rgb(238, 231, 233)" }, ticks: { color: "#000", font: { size: 16, family: "Calibre" } }, autoSkip: false, display: true },
|
15
|
+
y: { border: { color: "rgb(238, 231, 233)" }, grid: { display: false }, ticks: { font: { size: 16, family: "Calibre" }, color: "#000" }, min: (@minutes.map(&:second).min.to_f * 0.98).ceil, max: (@minutes.map(&:second).max) }
|
16
16
|
} } %>
|
17
17
|
</div>
|
18
|
-
|
19
|
-
<script>
|
20
|
-
document.addEventListener('keydown',(event) => {
|
21
|
-
const chart = Chartkick.charts[Object.keys(Chartkick.charts)[0]].getChartObject()
|
22
|
-
if (event.key === 'Escape' || event.key === 'Esc') {
|
23
|
-
chart.resetZoom()
|
24
|
-
}
|
25
|
-
});
|
26
|
-
</script>
|
@@ -20,348 +20,20 @@
|
|
20
20
|
|
21
21
|
Chartkick.use(Chart);
|
22
22
|
Chart.register(zoomPlugin);
|
23
|
+
|
24
|
+
document.addEventListener('keydown',(event) => {
|
25
|
+
Object.keys(Chartkick.charts).forEach((key) => {
|
26
|
+
const chart = Chartkick.charts[key].getChartObject()
|
27
|
+
if (event.key === 'Escape' || event.key === 'Esc') {
|
28
|
+
chart.resetZoom()
|
29
|
+
}
|
30
|
+
})
|
31
|
+
});
|
23
32
|
</script>
|
24
33
|
|
25
34
|
<title>Active Insights</title>
|
26
|
-
|
27
|
-
|
28
|
-
background-color: #FAFAFA;
|
29
|
-
color: #333;
|
30
|
-
color-scheme: light dark;
|
31
|
-
supported-color-schemes: light dark;
|
32
|
-
margin: 0px;
|
33
|
-
}
|
34
|
-
|
35
|
-
body, p, ol, ul, td, input {
|
36
|
-
font-family: helvetica, verdana, arial, sans-serif;
|
37
|
-
font-size: 15px;
|
38
|
-
line-height: 18px;
|
39
|
-
}
|
40
|
-
|
41
|
-
form {
|
42
|
-
margin-bottom: 0px;
|
43
|
-
}
|
44
|
-
|
45
|
-
pre {
|
46
|
-
font-size: 11px;
|
47
|
-
white-space: pre-wrap;
|
48
|
-
}
|
49
|
-
|
50
|
-
pre.box {
|
51
|
-
border: 1px solid #EEE;
|
52
|
-
padding: 10px;
|
53
|
-
margin: 0px;
|
54
|
-
width: 958px;
|
55
|
-
}
|
56
|
-
|
57
|
-
header {
|
58
|
-
color: #F0F0F0;
|
59
|
-
background: #C00;
|
60
|
-
padding: 0.5em 1.5em;
|
61
|
-
display: flex;
|
62
|
-
flex-direction: row;
|
63
|
-
justify-content: space-between;
|
64
|
-
align-items: center;
|
65
|
-
}
|
66
|
-
|
67
|
-
h1 {
|
68
|
-
overflow-wrap: break-word;
|
69
|
-
margin: 0.2em 0;
|
70
|
-
line-height: 1.1em;
|
71
|
-
font-size: 2em;
|
72
|
-
}
|
73
|
-
|
74
|
-
h2 {
|
75
|
-
color: #C00;
|
76
|
-
line-height: 25px;
|
77
|
-
}
|
78
|
-
|
79
|
-
code.traces {
|
80
|
-
font-size: 11px;
|
81
|
-
}
|
82
|
-
|
83
|
-
.response-heading, .request-heading {
|
84
|
-
margin-top: 30px;
|
85
|
-
}
|
86
|
-
|
87
|
-
.exception-message {
|
88
|
-
padding: 8px 0;
|
89
|
-
}
|
90
|
-
|
91
|
-
.exception-message .message {
|
92
|
-
margin-bottom: 8px;
|
93
|
-
line-height: 25px;
|
94
|
-
font-size: 1.5em;
|
95
|
-
font-weight: bold;
|
96
|
-
color: #C00;
|
97
|
-
}
|
98
|
-
|
99
|
-
.details {
|
100
|
-
border: 1px solid #D0D0D0;
|
101
|
-
border-radius: 4px;
|
102
|
-
margin: 1em 0px;
|
103
|
-
display: block;
|
104
|
-
max-width: 978px;
|
105
|
-
}
|
106
|
-
|
107
|
-
.summary {
|
108
|
-
padding: 8px 15px;
|
109
|
-
border-bottom: 1px solid #D0D0D0;
|
110
|
-
display: block;
|
111
|
-
}
|
112
|
-
|
113
|
-
a.summary {
|
114
|
-
color: #F0F0F0;
|
115
|
-
text-decoration: none;
|
116
|
-
background: #C52F24;
|
117
|
-
border-bottom: none;
|
118
|
-
}
|
119
|
-
|
120
|
-
.details pre {
|
121
|
-
margin: 5px;
|
122
|
-
border: none;
|
123
|
-
}
|
124
|
-
|
125
|
-
#container {
|
126
|
-
box-sizing: border-box;
|
127
|
-
width: 100%;
|
128
|
-
padding: 0 1.5em;
|
129
|
-
}
|
130
|
-
|
131
|
-
.source * {
|
132
|
-
margin: 0px;
|
133
|
-
padding: 0px;
|
134
|
-
}
|
135
|
-
|
136
|
-
.source {
|
137
|
-
border: 1px solid #D9D9D9;
|
138
|
-
background: #ECECEC;
|
139
|
-
max-width: 978px;
|
140
|
-
}
|
141
|
-
|
142
|
-
.source pre {
|
143
|
-
padding: 10px 0px;
|
144
|
-
border: none;
|
145
|
-
}
|
146
|
-
|
147
|
-
.source .data {
|
148
|
-
font-size: 80%;
|
149
|
-
overflow: auto;
|
150
|
-
background-color: #FFF;
|
151
|
-
}
|
152
|
-
|
153
|
-
.info {
|
154
|
-
padding: 0.5em;
|
155
|
-
}
|
156
|
-
|
157
|
-
.source .data .line_numbers {
|
158
|
-
background-color: #ECECEC;
|
159
|
-
color: #555;
|
160
|
-
padding: 1em .5em;
|
161
|
-
border-right: 1px solid #DDD;
|
162
|
-
text-align: right;
|
163
|
-
}
|
164
|
-
|
165
|
-
.line {
|
166
|
-
padding-left: 10px;
|
167
|
-
white-space: pre;
|
168
|
-
}
|
169
|
-
|
170
|
-
.line:hover {
|
171
|
-
background-color: #F6F6F6;
|
172
|
-
}
|
173
|
-
|
174
|
-
.line.active {
|
175
|
-
background-color: #FCC;
|
176
|
-
}
|
177
|
-
|
178
|
-
.error_highlight {
|
179
|
-
display: inline-block;
|
180
|
-
background-color: #FF9;
|
181
|
-
text-decoration: #F00 wavy underline;
|
182
|
-
}
|
183
|
-
|
184
|
-
.error_highlight_tip {
|
185
|
-
color: #666;
|
186
|
-
padding: 2px 2px;
|
187
|
-
font-size: 10px;
|
188
|
-
}
|
189
|
-
|
190
|
-
.button_to {
|
191
|
-
display: inline-block;
|
192
|
-
margin-top: 0.75em;
|
193
|
-
margin-bottom: 0.75em;
|
194
|
-
}
|
195
|
-
|
196
|
-
.hidden {
|
197
|
-
display: none;
|
198
|
-
}
|
199
|
-
|
200
|
-
.correction {
|
201
|
-
list-style-type: none;
|
202
|
-
}
|
203
|
-
|
204
|
-
input[type="submit"] {
|
205
|
-
color: white;
|
206
|
-
background-color: #C00;
|
207
|
-
border: none;
|
208
|
-
border-radius: 12px;
|
209
|
-
box-shadow: 0 3px #F99;
|
210
|
-
font-size: 13px;
|
211
|
-
font-weight: bold;
|
212
|
-
margin: 0;
|
213
|
-
padding: 10px 18px;
|
214
|
-
cursor: pointer;
|
215
|
-
-webkit-appearance: none;
|
216
|
-
}
|
217
|
-
input[type="submit"]:focus,
|
218
|
-
input[type="submit"]:hover {
|
219
|
-
opacity: 0.8;
|
220
|
-
}
|
221
|
-
input[type="submit"]:active {
|
222
|
-
box-shadow: 0 2px #F99;
|
223
|
-
transform: translateY(1px)
|
224
|
-
}
|
225
|
-
|
226
|
-
a { color: #980905; }
|
227
|
-
a:visited { color: #666; }
|
228
|
-
a.trace-frames {
|
229
|
-
color: #666;
|
230
|
-
overflow-wrap: break-word;
|
231
|
-
}
|
232
|
-
a:hover, a.trace-frames.selected { color: #C00; }
|
233
|
-
a.summary:hover { color: #FFF; }
|
234
|
-
|
235
|
-
@media (prefers-color-scheme: dark) {
|
236
|
-
body {
|
237
|
-
background-color: #222;
|
238
|
-
color: #ECECEC;
|
239
|
-
}
|
240
|
-
|
241
|
-
.details, .summary {
|
242
|
-
border-color: #666;
|
243
|
-
}
|
244
|
-
|
245
|
-
.source {
|
246
|
-
border-color: #555;
|
247
|
-
background-color: #333;
|
248
|
-
}
|
249
|
-
|
250
|
-
.source .data {
|
251
|
-
background: #444;
|
252
|
-
}
|
253
|
-
|
254
|
-
.source .data .line_numbers {
|
255
|
-
background: #333;
|
256
|
-
border-color: #222;
|
257
|
-
}
|
258
|
-
|
259
|
-
.line:hover {
|
260
|
-
background: #666;
|
261
|
-
}
|
262
|
-
|
263
|
-
.line.active {
|
264
|
-
background-color: #900;
|
265
|
-
}
|
266
|
-
|
267
|
-
.error_highlight {
|
268
|
-
color: #333;
|
269
|
-
}
|
270
|
-
|
271
|
-
input[type="submit"] {
|
272
|
-
box-shadow: 0 3px #800;
|
273
|
-
}
|
274
|
-
input[type="submit"]:active {
|
275
|
-
box-shadow: 0 2px #800;
|
276
|
-
}
|
277
|
-
|
278
|
-
a { color: #C00; }
|
279
|
-
}
|
280
|
-
|
281
|
-
table {
|
282
|
-
margin: 0;
|
283
|
-
border-collapse: collapse;
|
284
|
-
word-wrap:break-word;
|
285
|
-
table-layout: auto;
|
286
|
-
width: 100%;
|
287
|
-
margin-top: 50px;
|
288
|
-
}
|
289
|
-
|
290
|
-
table thead tr {
|
291
|
-
border-bottom: 2px solid #ddd;
|
292
|
-
}
|
293
|
-
|
294
|
-
table th {
|
295
|
-
padding-left: 30px;
|
296
|
-
text-align: left;
|
297
|
-
}
|
298
|
-
|
299
|
-
table tbody tr {
|
300
|
-
border-bottom: 1px solid #ddd;
|
301
|
-
}
|
302
|
-
|
303
|
-
table tbody tr:nth-child(odd) {
|
304
|
-
background: #f2f2f2;
|
305
|
-
}
|
306
|
-
|
307
|
-
table td {
|
308
|
-
padding: 4px 30px;
|
309
|
-
}
|
310
|
-
|
311
|
-
@media (prefers-color-scheme: dark) {
|
312
|
-
table tbody tr:nth-child(odd) {
|
313
|
-
background: #282828;
|
314
|
-
}
|
315
|
-
}
|
316
|
-
|
317
|
-
.pl-30px {
|
318
|
-
padding-left: 30px;
|
319
|
-
}
|
320
|
-
|
321
|
-
.pt-30px {
|
322
|
-
padding-top: 30px;
|
323
|
-
}
|
324
|
-
|
325
|
-
.flex {
|
326
|
-
display: flex;
|
327
|
-
}
|
328
|
-
|
329
|
-
.flex-col {
|
330
|
-
flex-direction: column;
|
331
|
-
}
|
332
|
-
.flex-row {
|
333
|
-
flex-direction: row;
|
334
|
-
}
|
335
|
-
.justify-around {
|
336
|
-
justify-content: space-around;
|
337
|
-
}
|
338
|
-
|
339
|
-
.justify-center {
|
340
|
-
justify-content: center;
|
341
|
-
}
|
342
|
-
.items-center {
|
343
|
-
align-items: center;
|
344
|
-
}
|
345
|
-
.font-size-30 {
|
346
|
-
font-size: 30px;
|
347
|
-
line-height: 30px;
|
348
|
-
}
|
349
|
-
.no-underline {
|
350
|
-
text-decoration: none;
|
351
|
-
}
|
352
|
-
.p-16px {
|
353
|
-
padding: 16px;
|
354
|
-
}
|
355
|
-
|
356
|
-
a.white {
|
357
|
-
color: #fff;
|
358
|
-
}
|
359
|
-
.mr-15px {
|
360
|
-
margin-right: 15px;
|
361
|
-
}
|
362
|
-
|
363
|
-
<%= yield :style %>
|
364
|
-
</style>
|
35
|
+
<%= stylesheet_link_tag "active_insights/application" %>
|
36
|
+
<style><%= yield :style %></style>
|
365
37
|
</head>
|
366
38
|
<body><%= yield %></body>
|
367
39
|
</html>
|
@@ -4,12 +4,13 @@ require "active_insights"
|
|
4
4
|
|
5
5
|
ActiveInsights::Engine.importmap.draw do
|
6
6
|
pin "chartkick", to: "https://ga.jspm.io/npm:chartkick@5.0.1/dist/chartkick.esm.js"
|
7
|
-
pin "chart.js", to: "https://ga.jspm.io/npm:chart.js@4.4.
|
7
|
+
pin "chart.js", to: "https://ga.jspm.io/npm:chart.js@4.4.4/dist/chart.js"
|
8
|
+
|
8
9
|
pin "chartjs-adapter-date-fns", to: "https://ga.jspm.io/npm:chartjs-adapter-date-fns@3.0.0/dist/chartjs-adapter-date-fns.esm.js"
|
9
10
|
pin "date-fns", to: "https://ga.jspm.io/npm:date-fns@3.2.0/index.mjs"
|
10
11
|
|
11
12
|
pin "chartjs-plugin-zoom", to: "https://ga.jspm.io/npm:chartjs-plugin-zoom@2.0.1/dist/chartjs-plugin-zoom.esm.js"
|
12
13
|
pin "hammerjs", to: "https://ga.jspm.io/npm:hammerjs@2.0.8/hammer.js"
|
13
14
|
pin "@kurkle/color", to: "https://ga.jspm.io/npm:@kurkle/color@0.3.2/dist/color.esm.js"
|
14
|
-
pin "chart.js/helpers", to: "https://ga.jspm.io/npm:chart.js@4.4.
|
15
|
+
pin "chart.js/helpers", to: "https://ga.jspm.io/npm:chart.js@4.4.4/helpers/helpers.js"
|
15
16
|
end
|
@@ -34,11 +34,15 @@ module ActiveInsights
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def processing_times
|
37
|
-
Array.new(
|
37
|
+
Array.new(calculate_rpm) do
|
38
38
|
p50 + (beta_distribution.rng * (p95 - p50))
|
39
39
|
end.select { |time| time <= p99 }
|
40
40
|
end
|
41
41
|
|
42
|
+
def calculate_rpm
|
43
|
+
(rpm * 0.9) + (rpm * 0.2 * rand)
|
44
|
+
end
|
45
|
+
|
42
46
|
def beta_distribution
|
43
47
|
@beta_distribution ||= Rubystats::BetaDistribution.new(2, 5)
|
44
48
|
end
|
@@ -34,11 +34,15 @@ module ActiveInsights
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def response_times
|
37
|
-
Array.new(
|
37
|
+
Array.new(calculate_rpm) do
|
38
38
|
p50 + (beta_distribution.rng * (p95 - p50))
|
39
39
|
end.select { |time| time <= p99 }
|
40
40
|
end
|
41
41
|
|
42
|
+
def calculate_rpm
|
43
|
+
(rpm * 0.9) + (rpm * 0.2 * rand)
|
44
|
+
end
|
45
|
+
|
42
46
|
def beta_distribution
|
43
47
|
@beta_distribution ||= Rubystats::BetaDistribution.new(2, 5)
|
44
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeinsights
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Pezza
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chartkick
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '7.
|
47
|
+
version: '7.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '7.
|
54
|
+
version: '7.2'
|
55
55
|
description:
|
56
56
|
email:
|
57
57
|
- pezza@hey.com
|
@@ -61,6 +61,12 @@ extra_rdoc_files: []
|
|
61
61
|
files:
|
62
62
|
- README.md
|
63
63
|
- Rakefile
|
64
|
+
- app/assets/stylesheets/active_insights/application.css
|
65
|
+
- app/assets/stylesheets/active_insights/calibre-bold.woff2
|
66
|
+
- app/assets/stylesheets/active_insights/calibre-regular-italic.woff2
|
67
|
+
- app/assets/stylesheets/active_insights/calibre-regular.woff2
|
68
|
+
- app/assets/stylesheets/active_insights/calibre-semibold-italic.woff2
|
69
|
+
- app/assets/stylesheets/active_insights/calibre-semibold.woff2
|
64
70
|
- app/controllers/active_insights/application_controller.rb
|
65
71
|
- app/controllers/active_insights/jobs_controller.rb
|
66
72
|
- app/controllers/active_insights/jobs_latencies_controller.rb
|
@@ -104,14 +110,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
104
110
|
requirements:
|
105
111
|
- - ">="
|
106
112
|
- !ruby/object:Gem::Version
|
107
|
-
version: 3.
|
113
|
+
version: 3.2.0
|
108
114
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
115
|
requirements:
|
110
116
|
- - ">="
|
111
117
|
- !ruby/object:Gem::Version
|
112
118
|
version: '0'
|
113
119
|
requirements: []
|
114
|
-
rubygems_version: 3.5.
|
120
|
+
rubygems_version: 3.5.18
|
115
121
|
signing_key:
|
116
122
|
specification_version: 4
|
117
123
|
summary: Rails performance tracking
|