influxdb-rails 1.0.0.beta1 → 1.0.1.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +11 -0
  3. data/.gitignore +2 -0
  4. data/.rspec +1 -0
  5. data/.rubocop.yml +7 -1
  6. data/.travis.yml +9 -10
  7. data/CHANGELOG.md +48 -11
  8. data/Gemfile +6 -0
  9. data/README.md +278 -100
  10. data/Rakefile +17 -18
  11. data/gemfiles/Gemfile.rails-5.0.x +2 -0
  12. data/gemfiles/Gemfile.rails-6.0.x +10 -0
  13. data/influxdb-rails.gemspec +20 -10
  14. data/lib/influxdb-rails.rb +35 -118
  15. data/lib/influxdb/rails/configuration.rb +99 -179
  16. data/lib/influxdb/rails/context.rb +26 -0
  17. data/lib/influxdb/rails/helpers/rspec_matchers.rb +48 -0
  18. data/lib/influxdb/rails/metric.rb +39 -0
  19. data/lib/influxdb/rails/middleware/active_job_subscriber.rb +67 -0
  20. data/lib/influxdb/rails/middleware/active_record_subscriber.rb +26 -0
  21. data/lib/influxdb/rails/middleware/block_instrumentation_subscriber.rb +24 -0
  22. data/lib/influxdb/rails/middleware/render_subscriber.rb +32 -0
  23. data/lib/influxdb/rails/middleware/request_subscriber.rb +44 -0
  24. data/lib/influxdb/rails/middleware/sql_subscriber.rb +37 -0
  25. data/lib/influxdb/rails/middleware/subscriber.rb +68 -0
  26. data/lib/influxdb/rails/railtie.rb +28 -25
  27. data/lib/influxdb/rails/sql/normalizer.rb +27 -0
  28. data/lib/influxdb/rails/sql/query.rb +32 -0
  29. data/lib/influxdb/rails/tags.rb +33 -0
  30. data/lib/influxdb/rails/test_client.rb +13 -0
  31. data/lib/influxdb/rails/values.rb +24 -0
  32. data/lib/influxdb/rails/version.rb +1 -1
  33. data/lib/rails/generators/influxdb/influxdb_generator.rb +1 -1
  34. data/lib/rails/generators/influxdb/templates/initializer.rb +39 -9
  35. data/sample-dashboard/Dockerfile +24 -0
  36. data/sample-dashboard/README.md +74 -0
  37. data/sample-dashboard/Rakefile +9 -0
  38. data/sample-dashboard/Ruby On Rails Performance (per Action).json +1576 -0
  39. data/sample-dashboard/Ruby On Rails Performance (per Request).json +1053 -0
  40. data/sample-dashboard/Ruby On Rails Performance.json +2041 -0
  41. data/sample-dashboard/docker-compose.yml +34 -0
  42. data/sample-dashboard/provisioning/grafana-dashboards.yml +12 -0
  43. data/sample-dashboard/provisioning/grafana-datasource.yml +10 -0
  44. data/sample-dashboard/provisioning/performance-action.json +1576 -0
  45. data/sample-dashboard/provisioning/performance-request.json +1053 -0
  46. data/sample-dashboard/provisioning/performance.json +2041 -0
  47. data/spec/requests/action_controller_metrics_spec.rb +83 -0
  48. data/spec/requests/action_view_collection_metrics_spec.rb +66 -0
  49. data/spec/requests/action_view_partial_metrics_spec.rb +62 -0
  50. data/spec/requests/action_view_template_metrics_spec.rb +62 -0
  51. data/spec/requests/active_job_enqueue_metrics_spec.rb +65 -0
  52. data/spec/requests/active_job_perform_metrics_spec.rb +68 -0
  53. data/spec/requests/active_job_perform_start_metrics_spec.rb +68 -0
  54. data/spec/requests/active_record_instantiation_metrics_spec.rb +65 -0
  55. data/spec/requests/active_record_sql_metrics_spec.rb +103 -0
  56. data/spec/requests/block_inistrumentation_spec.rb +64 -0
  57. data/spec/requests/context_spec.rb +27 -0
  58. data/spec/requests/logger_spec.rb +10 -0
  59. data/spec/spec_helper.rb +12 -4
  60. data/spec/support/broken_client.rb +11 -0
  61. data/spec/support/rails5/app.rb +44 -5
  62. data/spec/support/rails6/app.rb +70 -0
  63. data/spec/support/views/metrics/_item.html.erb +1 -0
  64. data/spec/support/views/metrics/index.html.erb +5 -0
  65. data/spec/support/views/metrics/show.html.erb +4 -0
  66. data/spec/unit/block_instrumentation_spec.rb +18 -0
  67. data/spec/unit/configuration_spec.rb +64 -65
  68. data/spec/unit/sql/normalizer_spec.rb +15 -0
  69. data/spec/unit/sql/query_spec.rb +29 -0
  70. metadata +167 -44
  71. data/gemfiles/Gemfile.rails-4.2.x +0 -7
  72. data/lib/influxdb/rails/air_traffic_controller.rb +0 -41
  73. data/lib/influxdb/rails/backtrace.rb +0 -44
  74. data/lib/influxdb/rails/exception_presenter.rb +0 -94
  75. data/lib/influxdb/rails/instrumentation.rb +0 -34
  76. data/lib/influxdb/rails/logger.rb +0 -16
  77. data/lib/influxdb/rails/middleware/hijack_render_exception.rb +0 -16
  78. data/lib/influxdb/rails/middleware/hijack_rescue_action_everywhere.rb +0 -31
  79. data/lib/influxdb/rails/rack.rb +0 -24
  80. data/spec/controllers/widgets_controller_spec.rb +0 -15
  81. data/spec/integration/exceptions_spec.rb +0 -37
  82. data/spec/integration/integration_helper.rb +0 -1
  83. data/spec/integration/metrics_spec.rb +0 -21
  84. data/spec/support/rails4/app.rb +0 -30
  85. data/spec/unit/backtrace_spec.rb +0 -85
  86. data/spec/unit/exception_presenter_spec.rb +0 -23
  87. data/spec/unit/influxdb_rails_spec.rb +0 -164
@@ -0,0 +1,2041 @@
1
+ {
2
+ "__inputs": [
3
+ {
4
+ "name": "DS_INFLUXDB",
5
+ "label": "InfluxDB",
6
+ "description": "",
7
+ "type": "datasource",
8
+ "pluginId": "influxdb",
9
+ "pluginName": "InfluxDB"
10
+ }
11
+ ],
12
+ "__requires": [
13
+ {
14
+ "type": "grafana",
15
+ "id": "grafana",
16
+ "name": "Grafana",
17
+ "version": "6.2.4"
18
+ },
19
+ {
20
+ "type": "panel",
21
+ "id": "graph",
22
+ "name": "Graph",
23
+ "version": ""
24
+ },
25
+ {
26
+ "type": "datasource",
27
+ "id": "influxdb",
28
+ "name": "InfluxDB",
29
+ "version": "1.0.0"
30
+ },
31
+ {
32
+ "type": "panel",
33
+ "id": "singlestat",
34
+ "name": "Singlestat",
35
+ "version": ""
36
+ },
37
+ {
38
+ "type": "panel",
39
+ "id": "table",
40
+ "name": "Table",
41
+ "version": ""
42
+ }
43
+ ],
44
+ "annotations": {
45
+ "list": [
46
+ {
47
+ "builtIn": 1,
48
+ "datasource": "-- Grafana --",
49
+ "enable": true,
50
+ "hide": true,
51
+ "iconColor": "rgba(0, 211, 255, 1)",
52
+ "name": "Annotations & Alerts",
53
+ "type": "dashboard"
54
+ }
55
+ ]
56
+ },
57
+ "description": "Ruby on Rails Performance Insights based on influxdb and influxdb-rails",
58
+ "editable": true,
59
+ "gnetId": 10428,
60
+ "graphTooltip": 0,
61
+ "id": null,
62
+ "iteration": 1571758610473,
63
+ "links": [],
64
+ "panels": [
65
+ {
66
+ "cacheTimeout": null,
67
+ "colorBackground": false,
68
+ "colorValue": true,
69
+ "colors": [
70
+ "#299c46",
71
+ "rgba(237, 129, 40, 0.89)",
72
+ "#d44a3a"
73
+ ],
74
+ "datasource": "InfluxDB",
75
+ "description": "",
76
+ "format": "ms",
77
+ "gauge": {
78
+ "maxValue": 100,
79
+ "minValue": 0,
80
+ "show": false,
81
+ "thresholdLabels": false,
82
+ "thresholdMarkers": true
83
+ },
84
+ "id": 10,
85
+ "interval": null,
86
+ "links": [],
87
+ "mappingType": 1,
88
+ "mappingTypes": [
89
+ {
90
+ "name": "value to text",
91
+ "value": 1
92
+ },
93
+ {
94
+ "name": "range to text",
95
+ "value": 2
96
+ }
97
+ ],
98
+ "maxDataPoints": 100,
99
+ "nullPointMode": "connected",
100
+ "nullText": null,
101
+ "options": {},
102
+ "postfix": "",
103
+ "postfixFontSize": "50%",
104
+ "prefix": "",
105
+ "prefixFontSize": "50%",
106
+ "rangeMaps": [
107
+ {
108
+ "from": "null",
109
+ "text": "N/A",
110
+ "to": "null"
111
+ }
112
+ ],
113
+ "sparkline": {
114
+ "fillColor": "rgba(31, 118, 189, 0.18)",
115
+ "full": false,
116
+ "lineColor": "rgb(31, 120, 193)",
117
+ "show": true
118
+ },
119
+ "tableColumn": "",
120
+ "targets": [
121
+ {
122
+ "groupBy": [
123
+ {
124
+ "params": [
125
+ "$__interval"
126
+ ],
127
+ "type": "time"
128
+ },
129
+ {
130
+ "params": [
131
+ "null"
132
+ ],
133
+ "type": "fill"
134
+ }
135
+ ],
136
+ "hide": false,
137
+ "measurement": "rails",
138
+ "orderByTime": "ASC",
139
+ "policy": "default",
140
+ "refId": "A",
141
+ "resultFormat": "time_series",
142
+ "select": [
143
+ [
144
+ {
145
+ "params": [
146
+ "controller"
147
+ ],
148
+ "type": "field"
149
+ },
150
+ {
151
+ "params": [],
152
+ "type": "mean"
153
+ }
154
+ ]
155
+ ],
156
+ "tags": [
157
+ {
158
+ "key": "hook",
159
+ "operator": "=",
160
+ "value": "process_action"
161
+ }
162
+ ]
163
+ }
164
+ ],
165
+ "thresholds": "200,300",
166
+ "title": "Average Controller Action Time",
167
+ "type": "singlestat",
168
+ "valueFontSize": "80%",
169
+ "valueMaps": [
170
+ {
171
+ "op": "=",
172
+ "text": "N/A",
173
+ "value": "null"
174
+ }
175
+ ],
176
+ "valueName": "avg"
177
+ },
178
+ {
179
+ "cacheTimeout": null,
180
+ "colorBackground": false,
181
+ "colorValue": true,
182
+ "colors": [
183
+ "#299c46",
184
+ "rgba(237, 129, 40, 0.89)",
185
+ "#d44a3a"
186
+ ],
187
+ "datasource": "InfluxDB",
188
+ "format": "ms",
189
+ "gauge": {
190
+ "maxValue": 100,
191
+ "minValue": 0,
192
+ "show": false,
193
+ "thresholdLabels": false,
194
+ "thresholdMarkers": true
195
+ },
196
+ "gridPos": {
197
+ "h": 3,
198
+ "w": 6,
199
+ "x": 6,
200
+ "y": 0
201
+ },
202
+ "id": 12,
203
+ "interval": null,
204
+ "links": [],
205
+ "mappingType": 1,
206
+ "mappingTypes": [
207
+ {
208
+ "name": "value to text",
209
+ "value": 1
210
+ },
211
+ {
212
+ "name": "range to text",
213
+ "value": 2
214
+ }
215
+ ],
216
+ "maxDataPoints": 100,
217
+ "nullPointMode": "connected",
218
+ "nullText": null,
219
+ "options": {},
220
+ "postfix": "",
221
+ "postfixFontSize": "50%",
222
+ "prefix": "",
223
+ "prefixFontSize": "50%",
224
+ "rangeMaps": [
225
+ {
226
+ "from": "null",
227
+ "text": "N/A",
228
+ "to": "null"
229
+ }
230
+ ],
231
+ "sparkline": {
232
+ "fillColor": "rgba(31, 118, 189, 0.18)",
233
+ "full": false,
234
+ "lineColor": "rgb(31, 120, 193)",
235
+ "show": true
236
+ },
237
+ "tableColumn": "",
238
+ "targets": [
239
+ {
240
+ "groupBy": [
241
+ {
242
+ "params": [
243
+ "$__interval"
244
+ ],
245
+ "type": "time"
246
+ },
247
+ {
248
+ "params": [
249
+ "null"
250
+ ],
251
+ "type": "fill"
252
+ }
253
+ ],
254
+ "measurement": "rails",
255
+ "orderByTime": "ASC",
256
+ "policy": "default",
257
+ "refId": "A",
258
+ "resultFormat": "time_series",
259
+ "select": [
260
+ [
261
+ {
262
+ "params": [
263
+ "db"
264
+ ],
265
+ "type": "field"
266
+ },
267
+ {
268
+ "params": [],
269
+ "type": "mean"
270
+ }
271
+ ]
272
+ ],
273
+ "tags": [
274
+ {
275
+ "key": "hook",
276
+ "operator": "=",
277
+ "value": "process_action"
278
+ }
279
+ ]
280
+ }
281
+ ],
282
+ "thresholds": "50,100",
283
+ "title": "Average Database Query Time",
284
+ "type": "singlestat",
285
+ "valueFontSize": "80%",
286
+ "valueMaps": [
287
+ {
288
+ "op": "=",
289
+ "text": "N/A",
290
+ "value": "null"
291
+ }
292
+ ],
293
+ "valueName": "avg"
294
+ },
295
+ {
296
+ "cacheTimeout": null,
297
+ "colorBackground": false,
298
+ "colorValue": true,
299
+ "colors": [
300
+ "#299c46",
301
+ "rgba(237, 129, 40, 0.89)",
302
+ "#d44a3a"
303
+ ],
304
+ "datasource": "InfluxDB",
305
+ "format": "ms",
306
+ "gauge": {
307
+ "maxValue": 100,
308
+ "minValue": 0,
309
+ "show": false,
310
+ "thresholdLabels": false,
311
+ "thresholdMarkers": true
312
+ },
313
+ "gridPos": {
314
+ "h": 3,
315
+ "w": 6,
316
+ "x": 12,
317
+ "y": 0
318
+ },
319
+ "id": 14,
320
+ "interval": null,
321
+ "links": [],
322
+ "mappingType": 1,
323
+ "mappingTypes": [
324
+ {
325
+ "name": "value to text",
326
+ "value": 1
327
+ },
328
+ {
329
+ "name": "range to text",
330
+ "value": 2
331
+ }
332
+ ],
333
+ "maxDataPoints": 100,
334
+ "nullPointMode": "connected",
335
+ "nullText": null,
336
+ "options": {},
337
+ "postfix": "",
338
+ "postfixFontSize": "50%",
339
+ "prefix": "",
340
+ "prefixFontSize": "50%",
341
+ "rangeMaps": [
342
+ {
343
+ "from": "null",
344
+ "text": "N/A",
345
+ "to": "null"
346
+ }
347
+ ],
348
+ "sparkline": {
349
+ "fillColor": "rgba(31, 118, 189, 0.18)",
350
+ "full": false,
351
+ "lineColor": "rgb(31, 120, 193)",
352
+ "show": true
353
+ },
354
+ "tableColumn": "",
355
+ "targets": [
356
+ {
357
+ "groupBy": [
358
+ {
359
+ "params": [
360
+ "$interval"
361
+ ],
362
+ "type": "time"
363
+ }
364
+ ],
365
+ "measurement": "rails",
366
+ "orderByTime": "ASC",
367
+ "policy": "default",
368
+ "refId": "A",
369
+ "resultFormat": "time_series",
370
+ "select": [
371
+ [
372
+ {
373
+ "params": [
374
+ "view"
375
+ ],
376
+ "type": "field"
377
+ },
378
+ {
379
+ "params": [],
380
+ "type": "mean"
381
+ }
382
+ ]
383
+ ],
384
+ "tags": [
385
+ {
386
+ "key": "hook",
387
+ "operator": "=",
388
+ "value": "process_action"
389
+ }
390
+ ]
391
+ }
392
+ ],
393
+ "thresholds": "50,100",
394
+ "title": "Average View Rendering Time",
395
+ "type": "singlestat",
396
+ "valueFontSize": "80%",
397
+ "valueMaps": [
398
+ {
399
+ "op": "=",
400
+ "text": "N/A",
401
+ "value": "null"
402
+ }
403
+ ],
404
+ "valueName": "avg"
405
+ },
406
+ {
407
+ "cacheTimeout": null,
408
+ "colorBackground": false,
409
+ "colorValue": false,
410
+ "colors": [
411
+ "#299c46",
412
+ "rgba(237, 129, 40, 0.89)",
413
+ "#d44a3a"
414
+ ],
415
+ "datasource": "InfluxDB",
416
+ "decimals": null,
417
+ "format": "short",
418
+ "gauge": {
419
+ "maxValue": 100,
420
+ "minValue": 0,
421
+ "show": false,
422
+ "thresholdLabels": false,
423
+ "thresholdMarkers": true
424
+ },
425
+ "gridPos": {
426
+ "h": 3,
427
+ "w": 6,
428
+ "x": 18,
429
+ "y": 0
430
+ },
431
+ "id": 16,
432
+ "interval": null,
433
+ "links": [],
434
+ "mappingType": 1,
435
+ "mappingTypes": [
436
+ {
437
+ "name": "value to text",
438
+ "value": 1
439
+ },
440
+ {
441
+ "name": "range to text",
442
+ "value": 2
443
+ }
444
+ ],
445
+ "maxDataPoints": 100,
446
+ "nullPointMode": "connected",
447
+ "nullText": null,
448
+ "options": {},
449
+ "postfix": "",
450
+ "postfixFontSize": "50%",
451
+ "prefix": "",
452
+ "prefixFontSize": "50%",
453
+ "rangeMaps": [
454
+ {
455
+ "from": "null",
456
+ "text": "N/A",
457
+ "to": "null"
458
+ }
459
+ ],
460
+ "sparkline": {
461
+ "fillColor": "rgba(31, 118, 189, 0.18)",
462
+ "full": false,
463
+ "lineColor": "rgb(31, 120, 193)",
464
+ "show": false
465
+ },
466
+ "tableColumn": "",
467
+ "targets": [
468
+ {
469
+ "groupBy": [],
470
+ "hide": false,
471
+ "measurement": "rails",
472
+ "orderByTime": "ASC",
473
+ "policy": "default",
474
+ "refId": "A",
475
+ "resultFormat": "time_series",
476
+ "select": [
477
+ [
478
+ {
479
+ "params": [
480
+ "request_id"
481
+ ],
482
+ "type": "field"
483
+ },
484
+ {
485
+ "params": [],
486
+ "type": "count"
487
+ }
488
+ ]
489
+ ],
490
+ "tags": [
491
+ {
492
+ "key": "hook",
493
+ "operator": "=",
494
+ "value": "process_action"
495
+ }
496
+ ]
497
+ }
498
+ ],
499
+ "thresholds": "",
500
+ "title": "Total Number of Requests",
501
+ "type": "singlestat",
502
+ "valueFontSize": "80%",
503
+ "valueMaps": [
504
+ {
505
+ "op": "=",
506
+ "text": "N/A",
507
+ "value": "null"
508
+ }
509
+ ],
510
+ "valueName": "current"
511
+ },
512
+ {
513
+ "aliasColors": {
514
+ "rails.controller.mean": "#1f78c1"
515
+ },
516
+ "bars": false,
517
+ "dashLength": 10,
518
+ "dashes": false,
519
+ "datasource": "InfluxDB",
520
+ "description": "Time spent in controller actions",
521
+ "fill": 1,
522
+ "gridPos": {
523
+ "h": 9,
524
+ "w": 8,
525
+ "x": 0,
526
+ "y": 3
527
+ },
528
+ "id": 6,
529
+ "legend": {
530
+ "alignAsTable": false,
531
+ "avg": false,
532
+ "current": false,
533
+ "max": false,
534
+ "min": false,
535
+ "rightSide": false,
536
+ "show": false,
537
+ "total": false,
538
+ "values": false
539
+ },
540
+ "lines": true,
541
+ "linewidth": 1,
542
+ "links": [],
543
+ "nullPointMode": "null",
544
+ "options": {},
545
+ "paceLength": 10,
546
+ "percentage": false,
547
+ "pointradius": 5,
548
+ "points": false,
549
+ "renderer": "flot",
550
+ "seriesOverrides": [
551
+ {
552
+ "alias": "Maximum",
553
+ "fillBelowTo": "Minimum",
554
+ "lines": false
555
+ },
556
+ {
557
+ "alias": "Minimum",
558
+ "lines": false
559
+ }
560
+ ],
561
+ "spaceLength": 10,
562
+ "stack": false,
563
+ "steppedLine": false,
564
+ "targets": [
565
+ {
566
+ "alias": "Maximum",
567
+ "groupBy": [
568
+ {
569
+ "params": [
570
+ "$__interval"
571
+ ],
572
+ "type": "time"
573
+ },
574
+ {
575
+ "params": [
576
+ "0"
577
+ ],
578
+ "type": "fill"
579
+ }
580
+ ],
581
+ "measurement": "rails",
582
+ "orderByTime": "ASC",
583
+ "policy": "default",
584
+ "refId": "C",
585
+ "resultFormat": "time_series",
586
+ "select": [
587
+ [
588
+ {
589
+ "params": [
590
+ "controller"
591
+ ],
592
+ "type": "field"
593
+ },
594
+ {
595
+ "params": [],
596
+ "type": "max"
597
+ }
598
+ ]
599
+ ],
600
+ "tags": [
601
+ {
602
+ "key": "hook",
603
+ "operator": "=",
604
+ "value": "process_action"
605
+ }
606
+ ]
607
+ },
608
+ {
609
+ "alias": "Mean",
610
+ "groupBy": [
611
+ {
612
+ "params": [
613
+ "$__interval"
614
+ ],
615
+ "type": "time"
616
+ },
617
+ {
618
+ "params": [
619
+ "0"
620
+ ],
621
+ "type": "fill"
622
+ }
623
+ ],
624
+ "measurement": "rails",
625
+ "orderByTime": "ASC",
626
+ "policy": "default",
627
+ "refId": "A",
628
+ "resultFormat": "time_series",
629
+ "select": [
630
+ [
631
+ {
632
+ "params": [
633
+ "controller"
634
+ ],
635
+ "type": "field"
636
+ },
637
+ {
638
+ "params": [],
639
+ "type": "mean"
640
+ }
641
+ ]
642
+ ],
643
+ "tags": [
644
+ {
645
+ "key": "hook",
646
+ "operator": "=",
647
+ "value": "process_action"
648
+ }
649
+ ]
650
+ },
651
+ {
652
+ "alias": "Minimum",
653
+ "groupBy": [
654
+ {
655
+ "params": [
656
+ "$__interval"
657
+ ],
658
+ "type": "time"
659
+ },
660
+ {
661
+ "params": [
662
+ "0"
663
+ ],
664
+ "type": "fill"
665
+ }
666
+ ],
667
+ "measurement": "rails",
668
+ "orderByTime": "ASC",
669
+ "policy": "default",
670
+ "refId": "B",
671
+ "resultFormat": "time_series",
672
+ "select": [
673
+ [
674
+ {
675
+ "params": [
676
+ "controller"
677
+ ],
678
+ "type": "field"
679
+ },
680
+ {
681
+ "params": [],
682
+ "type": "min"
683
+ }
684
+ ]
685
+ ],
686
+ "tags": [
687
+ {
688
+ "key": "hook",
689
+ "operator": "=",
690
+ "value": "process_action"
691
+ }
692
+ ]
693
+ }
694
+ ],
695
+ "thresholds": [],
696
+ "timeFrom": null,
697
+ "timeRegions": [],
698
+ "timeShift": null,
699
+ "title": "Controller Action Runtime",
700
+ "tooltip": {
701
+ "shared": true,
702
+ "sort": 0,
703
+ "value_type": "individual"
704
+ },
705
+ "type": "graph",
706
+ "xaxis": {
707
+ "buckets": null,
708
+ "mode": "time",
709
+ "name": null,
710
+ "show": true,
711
+ "values": []
712
+ },
713
+ "yaxes": [
714
+ {
715
+ "format": "dtdurationms",
716
+ "label": null,
717
+ "logBase": 2,
718
+ "max": null,
719
+ "min": null,
720
+ "show": true
721
+ },
722
+ {
723
+ "format": "short",
724
+ "label": null,
725
+ "logBase": 1,
726
+ "max": null,
727
+ "min": null,
728
+ "show": true
729
+ }
730
+ ],
731
+ "yaxis": {
732
+ "align": false,
733
+ "alignLevel": null
734
+ }
735
+ },
736
+ {
737
+ "aliasColors": {},
738
+ "bars": false,
739
+ "dashLength": 10,
740
+ "dashes": false,
741
+ "datasource": "InfluxDB",
742
+ "description": "Time spent in executing database queries",
743
+ "fill": 1,
744
+ "gridPos": {
745
+ "h": 9,
746
+ "w": 8,
747
+ "x": 8,
748
+ "y": 3
749
+ },
750
+ "id": 2,
751
+ "legend": {
752
+ "avg": false,
753
+ "current": false,
754
+ "max": false,
755
+ "min": false,
756
+ "show": false,
757
+ "total": false,
758
+ "values": false
759
+ },
760
+ "lines": true,
761
+ "linewidth": 1,
762
+ "links": [],
763
+ "nullPointMode": "null",
764
+ "options": {},
765
+ "paceLength": 10,
766
+ "percentage": false,
767
+ "pointradius": 5,
768
+ "points": false,
769
+ "renderer": "flot",
770
+ "seriesOverrides": [
771
+ {
772
+ "alias": "Maximum",
773
+ "fillBelowTo": "Minimum",
774
+ "lines": false
775
+ },
776
+ {
777
+ "alias": "Minimum",
778
+ "lines": false
779
+ }
780
+ ],
781
+ "spaceLength": 10,
782
+ "stack": false,
783
+ "steppedLine": false,
784
+ "targets": [
785
+ {
786
+ "alias": "Maximum",
787
+ "groupBy": [
788
+ {
789
+ "params": [
790
+ "$__interval"
791
+ ],
792
+ "type": "time"
793
+ },
794
+ {
795
+ "params": [
796
+ "0"
797
+ ],
798
+ "type": "fill"
799
+ }
800
+ ],
801
+ "measurement": "rails",
802
+ "orderByTime": "ASC",
803
+ "policy": "default",
804
+ "refId": "B",
805
+ "resultFormat": "time_series",
806
+ "select": [
807
+ [
808
+ {
809
+ "params": [
810
+ "db"
811
+ ],
812
+ "type": "field"
813
+ },
814
+ {
815
+ "params": [],
816
+ "type": "max"
817
+ }
818
+ ]
819
+ ],
820
+ "tags": [
821
+ {
822
+ "key": "hook",
823
+ "operator": "=",
824
+ "value": "process_action"
825
+ }
826
+ ]
827
+ },
828
+ {
829
+ "alias": "Mean",
830
+ "groupBy": [
831
+ {
832
+ "params": [
833
+ "$__interval"
834
+ ],
835
+ "type": "time"
836
+ },
837
+ {
838
+ "params": [
839
+ "0"
840
+ ],
841
+ "type": "fill"
842
+ }
843
+ ],
844
+ "measurement": "rails",
845
+ "orderByTime": "ASC",
846
+ "policy": "default",
847
+ "refId": "A",
848
+ "resultFormat": "time_series",
849
+ "select": [
850
+ [
851
+ {
852
+ "params": [
853
+ "db"
854
+ ],
855
+ "type": "field"
856
+ },
857
+ {
858
+ "params": [],
859
+ "type": "mean"
860
+ }
861
+ ]
862
+ ],
863
+ "tags": [
864
+ {
865
+ "key": "hook",
866
+ "operator": "=",
867
+ "value": "process_action"
868
+ }
869
+ ]
870
+ },
871
+ {
872
+ "alias": "Minimum",
873
+ "groupBy": [
874
+ {
875
+ "params": [
876
+ "$__interval"
877
+ ],
878
+ "type": "time"
879
+ },
880
+ {
881
+ "params": [
882
+ "0"
883
+ ],
884
+ "type": "fill"
885
+ }
886
+ ],
887
+ "measurement": "rails",
888
+ "orderByTime": "ASC",
889
+ "policy": "default",
890
+ "refId": "C",
891
+ "resultFormat": "time_series",
892
+ "select": [
893
+ [
894
+ {
895
+ "params": [
896
+ "db"
897
+ ],
898
+ "type": "field"
899
+ },
900
+ {
901
+ "params": [],
902
+ "type": "min"
903
+ }
904
+ ]
905
+ ],
906
+ "tags": [
907
+ {
908
+ "key": "hook",
909
+ "operator": "=",
910
+ "value": "process_action"
911
+ }
912
+ ]
913
+ }
914
+ ],
915
+ "thresholds": [],
916
+ "timeFrom": null,
917
+ "timeRegions": [],
918
+ "timeShift": null,
919
+ "title": "Database Query Runtime",
920
+ "tooltip": {
921
+ "shared": true,
922
+ "sort": 0,
923
+ "value_type": "individual"
924
+ },
925
+ "type": "graph",
926
+ "xaxis": {
927
+ "buckets": null,
928
+ "mode": "time",
929
+ "name": null,
930
+ "show": true,
931
+ "values": []
932
+ },
933
+ "yaxes": [
934
+ {
935
+ "format": "dtdurationms",
936
+ "label": null,
937
+ "logBase": 2,
938
+ "max": null,
939
+ "min": null,
940
+ "show": true
941
+ },
942
+ {
943
+ "format": "short",
944
+ "label": null,
945
+ "logBase": 1,
946
+ "max": null,
947
+ "min": null,
948
+ "show": true
949
+ }
950
+ ],
951
+ "yaxis": {
952
+ "align": false,
953
+ "alignLevel": null
954
+ }
955
+ },
956
+ {
957
+ "aliasColors": {
958
+ "rails.view.mean": "#eab839"
959
+ },
960
+ "bars": false,
961
+ "dashLength": 10,
962
+ "dashes": false,
963
+ "datasource": "InfluxDB",
964
+ "description": "Time spent in rendering views",
965
+ "fill": 0,
966
+ "gridPos": {
967
+ "h": 9,
968
+ "w": 8,
969
+ "x": 16,
970
+ "y": 3
971
+ },
972
+ "id": 4,
973
+ "legend": {
974
+ "avg": false,
975
+ "current": false,
976
+ "max": false,
977
+ "min": false,
978
+ "show": false,
979
+ "total": false,
980
+ "values": false
981
+ },
982
+ "lines": true,
983
+ "linewidth": 1,
984
+ "links": [],
985
+ "nullPointMode": "null",
986
+ "options": {},
987
+ "paceLength": 10,
988
+ "percentage": false,
989
+ "pointradius": 5,
990
+ "points": false,
991
+ "renderer": "flot",
992
+ "seriesOverrides": [
993
+ {
994
+ "alias": "Maximum",
995
+ "fillBelowTo": "Minimum",
996
+ "lines": false
997
+ },
998
+ {
999
+ "alias": "Minimum",
1000
+ "lines": false
1001
+ }
1002
+ ],
1003
+ "spaceLength": 10,
1004
+ "stack": false,
1005
+ "steppedLine": false,
1006
+ "targets": [
1007
+ {
1008
+ "alias": "Maximum",
1009
+ "groupBy": [
1010
+ {
1011
+ "params": [
1012
+ "$__interval"
1013
+ ],
1014
+ "type": "time"
1015
+ },
1016
+ {
1017
+ "params": [
1018
+ "0"
1019
+ ],
1020
+ "type": "fill"
1021
+ }
1022
+ ],
1023
+ "measurement": "rails",
1024
+ "orderByTime": "ASC",
1025
+ "policy": "default",
1026
+ "refId": "C",
1027
+ "resultFormat": "time_series",
1028
+ "select": [
1029
+ [
1030
+ {
1031
+ "params": [
1032
+ "view"
1033
+ ],
1034
+ "type": "field"
1035
+ },
1036
+ {
1037
+ "params": [],
1038
+ "type": "max"
1039
+ }
1040
+ ]
1041
+ ],
1042
+ "tags": [
1043
+ {
1044
+ "key": "hook",
1045
+ "operator": "=",
1046
+ "value": "process_action"
1047
+ }
1048
+ ]
1049
+ },
1050
+ {
1051
+ "alias": "Mean",
1052
+ "groupBy": [
1053
+ {
1054
+ "params": [
1055
+ "$__interval"
1056
+ ],
1057
+ "type": "time"
1058
+ },
1059
+ {
1060
+ "params": [
1061
+ "0"
1062
+ ],
1063
+ "type": "fill"
1064
+ }
1065
+ ],
1066
+ "measurement": "rails",
1067
+ "orderByTime": "ASC",
1068
+ "policy": "default",
1069
+ "refId": "A",
1070
+ "resultFormat": "time_series",
1071
+ "select": [
1072
+ [
1073
+ {
1074
+ "params": [
1075
+ "view"
1076
+ ],
1077
+ "type": "field"
1078
+ },
1079
+ {
1080
+ "params": [],
1081
+ "type": "mean"
1082
+ }
1083
+ ]
1084
+ ],
1085
+ "tags": [
1086
+ {
1087
+ "key": "hook",
1088
+ "operator": "=",
1089
+ "value": "process_action"
1090
+ }
1091
+ ]
1092
+ },
1093
+ {
1094
+ "alias": "Minimum",
1095
+ "groupBy": [
1096
+ {
1097
+ "params": [
1098
+ "$__interval"
1099
+ ],
1100
+ "type": "time"
1101
+ },
1102
+ {
1103
+ "params": [
1104
+ "0"
1105
+ ],
1106
+ "type": "fill"
1107
+ }
1108
+ ],
1109
+ "measurement": "rails",
1110
+ "orderByTime": "ASC",
1111
+ "policy": "default",
1112
+ "refId": "B",
1113
+ "resultFormat": "time_series",
1114
+ "select": [
1115
+ [
1116
+ {
1117
+ "params": [
1118
+ "view"
1119
+ ],
1120
+ "type": "field"
1121
+ },
1122
+ {
1123
+ "params": [],
1124
+ "type": "min"
1125
+ }
1126
+ ]
1127
+ ],
1128
+ "tags": [
1129
+ {
1130
+ "key": "hook",
1131
+ "operator": "=",
1132
+ "value": "process_action"
1133
+ }
1134
+ ]
1135
+ }
1136
+ ],
1137
+ "thresholds": [],
1138
+ "timeFrom": null,
1139
+ "timeRegions": [],
1140
+ "timeShift": null,
1141
+ "title": "View Rendering Runtime",
1142
+ "tooltip": {
1143
+ "shared": true,
1144
+ "sort": 0,
1145
+ "value_type": "individual"
1146
+ },
1147
+ "type": "graph",
1148
+ "xaxis": {
1149
+ "buckets": null,
1150
+ "mode": "time",
1151
+ "name": null,
1152
+ "show": true,
1153
+ "values": []
1154
+ },
1155
+ "yaxes": [
1156
+ {
1157
+ "format": "dtdurationms",
1158
+ "label": null,
1159
+ "logBase": 2,
1160
+ "max": null,
1161
+ "min": null,
1162
+ "show": true
1163
+ },
1164
+ {
1165
+ "format": "short",
1166
+ "label": null,
1167
+ "logBase": 1,
1168
+ "max": null,
1169
+ "min": null,
1170
+ "show": true
1171
+ }
1172
+ ],
1173
+ "yaxis": {
1174
+ "align": false,
1175
+ "alignLevel": null
1176
+ }
1177
+ },
1178
+ {
1179
+ "columns": [],
1180
+ "datasource": "InfluxDB",
1181
+ "description": "Data for the selected range by controller action.\n\n- Count: Number of occurrences\n- Mean: Average time spent\n- Median: Median time spent\n- Maximum: Slowest occurrence\n\n[Average vs. Median?](https://www.differencebetween.com/difference-between-mean-and-median/)",
1182
+ "fontSize": "100%",
1183
+ "gridPos": {
1184
+ "h": 13,
1185
+ "w": 12,
1186
+ "x": 0,
1187
+ "y": 12
1188
+ },
1189
+ "id": 18,
1190
+ "links": [],
1191
+ "options": {},
1192
+ "pageSize": null,
1193
+ "scroll": true,
1194
+ "showHeader": true,
1195
+ "sort": {
1196
+ "col": 5,
1197
+ "desc": true
1198
+ },
1199
+ "styles": [
1200
+ {
1201
+ "alias": "Time",
1202
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1203
+ "pattern": "Time",
1204
+ "type": "hidden"
1205
+ },
1206
+ {
1207
+ "alias": "Mean",
1208
+ "colorMode": null,
1209
+ "colors": [
1210
+ "rgba(245, 54, 54, 0.9)",
1211
+ "rgba(237, 129, 40, 0.89)",
1212
+ "rgba(50, 172, 45, 0.97)"
1213
+ ],
1214
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1215
+ "decimals": 2,
1216
+ "mappingType": 1,
1217
+ "pattern": "mean",
1218
+ "thresholds": [],
1219
+ "type": "number",
1220
+ "unit": "ms"
1221
+ },
1222
+ {
1223
+ "alias": "Count",
1224
+ "colorMode": null,
1225
+ "colors": [
1226
+ "rgba(245, 54, 54, 0.9)",
1227
+ "rgba(237, 129, 40, 0.89)",
1228
+ "rgba(50, 172, 45, 0.97)"
1229
+ ],
1230
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1231
+ "decimals": 0,
1232
+ "mappingType": 1,
1233
+ "pattern": "count",
1234
+ "thresholds": [],
1235
+ "type": "number",
1236
+ "unit": "short"
1237
+ },
1238
+ {
1239
+ "alias": "Median",
1240
+ "colorMode": null,
1241
+ "colors": [
1242
+ "rgba(245, 54, 54, 0.9)",
1243
+ "rgba(237, 129, 40, 0.89)",
1244
+ "rgba(50, 172, 45, 0.97)"
1245
+ ],
1246
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1247
+ "decimals": 2,
1248
+ "mappingType": 1,
1249
+ "pattern": "median",
1250
+ "thresholds": [],
1251
+ "type": "number",
1252
+ "unit": "ms"
1253
+ },
1254
+ {
1255
+ "alias": "Controller Action",
1256
+ "colorMode": null,
1257
+ "colors": [
1258
+ "rgba(245, 54, 54, 0.9)",
1259
+ "rgba(237, 129, 40, 0.89)",
1260
+ "rgba(50, 172, 45, 0.97)"
1261
+ ],
1262
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1263
+ "decimals": 2,
1264
+ "link": true,
1265
+ "linkTargetBlank": true,
1266
+ "linkTooltip": "View data per this Controller Action",
1267
+ "linkUrl": "/d/$ACTION_DASHBOARD_UID/ruby-on-rails-performance-per-action?var-Action=${__cell}&from=$__from&to=$__to",
1268
+ "mappingType": 1,
1269
+ "pattern": "method",
1270
+ "thresholds": [],
1271
+ "type": "number",
1272
+ "unit": "short"
1273
+ },
1274
+ {
1275
+ "alias": "Maximum",
1276
+ "colorMode": null,
1277
+ "colors": [
1278
+ "rgba(245, 54, 54, 0.9)",
1279
+ "rgba(237, 129, 40, 0.89)",
1280
+ "rgba(50, 172, 45, 0.97)"
1281
+ ],
1282
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1283
+ "decimals": 2,
1284
+ "mappingType": 1,
1285
+ "pattern": "max",
1286
+ "thresholds": [],
1287
+ "type": "number",
1288
+ "unit": "ms"
1289
+ },
1290
+ {
1291
+ "alias": "",
1292
+ "colorMode": null,
1293
+ "colors": [
1294
+ "rgba(245, 54, 54, 0.9)",
1295
+ "rgba(237, 129, 40, 0.89)",
1296
+ "rgba(50, 172, 45, 0.97)"
1297
+ ],
1298
+ "decimals": 2,
1299
+ "pattern": "/.*/",
1300
+ "thresholds": [],
1301
+ "type": "number",
1302
+ "unit": "short"
1303
+ }
1304
+ ],
1305
+ "targets": [
1306
+ {
1307
+ "groupBy": [
1308
+ {
1309
+ "params": [
1310
+ "method"
1311
+ ],
1312
+ "type": "tag"
1313
+ }
1314
+ ],
1315
+ "limit": "",
1316
+ "measurement": "rails",
1317
+ "orderByTime": "ASC",
1318
+ "policy": "default",
1319
+ "refId": "A",
1320
+ "resultFormat": "table",
1321
+ "select": [
1322
+ [
1323
+ {
1324
+ "params": [
1325
+ "controller"
1326
+ ],
1327
+ "type": "field"
1328
+ },
1329
+ {
1330
+ "params": [],
1331
+ "type": "count"
1332
+ }
1333
+ ],
1334
+ [
1335
+ {
1336
+ "params": [
1337
+ "controller"
1338
+ ],
1339
+ "type": "field"
1340
+ },
1341
+ {
1342
+ "params": [],
1343
+ "type": "mean"
1344
+ }
1345
+ ],
1346
+ [
1347
+ {
1348
+ "params": [
1349
+ "controller"
1350
+ ],
1351
+ "type": "field"
1352
+ },
1353
+ {
1354
+ "params": [],
1355
+ "type": "median"
1356
+ }
1357
+ ],
1358
+ [
1359
+ {
1360
+ "params": [
1361
+ "controller"
1362
+ ],
1363
+ "type": "field"
1364
+ },
1365
+ {
1366
+ "params": [],
1367
+ "type": "max"
1368
+ }
1369
+ ]
1370
+ ],
1371
+ "tags": [
1372
+ {
1373
+ "key": "hook",
1374
+ "operator": "=",
1375
+ "value": "process_action"
1376
+ }
1377
+ ]
1378
+ }
1379
+ ],
1380
+ "title": "By Controller Action",
1381
+ "transform": "table",
1382
+ "type": "table"
1383
+ },
1384
+ {
1385
+ "columns": [],
1386
+ "datasource": "InfluxDB",
1387
+ "description": "Data for the selected range by database query.\n\n- Count: Number of occurrences\n- Mean: Average time spent\n- Median: Median time spent\n- Maximum: Slowest occurrence\n\n[Average vs. Median?](https://www.differencebetween.com/difference-between-mean-and-median/)",
1388
+ "fontSize": "100%",
1389
+ "gridPos": {
1390
+ "h": 13,
1391
+ "w": 12,
1392
+ "x": 12,
1393
+ "y": 12
1394
+ },
1395
+ "id": 29,
1396
+ "links": [],
1397
+ "options": {},
1398
+ "pageSize": null,
1399
+ "scroll": true,
1400
+ "showHeader": true,
1401
+ "sort": {
1402
+ "col": 6,
1403
+ "desc": true
1404
+ },
1405
+ "styles": [
1406
+ {
1407
+ "alias": "Time",
1408
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1409
+ "pattern": "Time",
1410
+ "type": "hidden"
1411
+ },
1412
+ {
1413
+ "alias": "Count",
1414
+ "colorMode": null,
1415
+ "colors": [
1416
+ "rgba(245, 54, 54, 0.9)",
1417
+ "rgba(237, 129, 40, 0.89)",
1418
+ "rgba(50, 172, 45, 0.97)"
1419
+ ],
1420
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1421
+ "decimals": null,
1422
+ "mappingType": 1,
1423
+ "pattern": "count",
1424
+ "thresholds": [],
1425
+ "type": "number",
1426
+ "unit": "short"
1427
+ },
1428
+ {
1429
+ "alias": "Mean",
1430
+ "colorMode": null,
1431
+ "colors": [
1432
+ "rgba(245, 54, 54, 0.9)",
1433
+ "rgba(237, 129, 40, 0.89)",
1434
+ "rgba(50, 172, 45, 0.97)"
1435
+ ],
1436
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1437
+ "decimals": 2,
1438
+ "mappingType": 1,
1439
+ "pattern": "mean",
1440
+ "thresholds": [],
1441
+ "type": "number",
1442
+ "unit": "ms"
1443
+ },
1444
+ {
1445
+ "alias": "Median",
1446
+ "colorMode": null,
1447
+ "colors": [
1448
+ "rgba(245, 54, 54, 0.9)",
1449
+ "rgba(237, 129, 40, 0.89)",
1450
+ "rgba(50, 172, 45, 0.97)"
1451
+ ],
1452
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1453
+ "decimals": 2,
1454
+ "mappingType": 1,
1455
+ "pattern": "median",
1456
+ "thresholds": [],
1457
+ "type": "number",
1458
+ "unit": "ms"
1459
+ },
1460
+ {
1461
+ "alias": "Controller Action",
1462
+ "colorMode": null,
1463
+ "colors": [
1464
+ "rgba(245, 54, 54, 0.9)",
1465
+ "rgba(237, 129, 40, 0.89)",
1466
+ "rgba(50, 172, 45, 0.97)"
1467
+ ],
1468
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1469
+ "decimals": 2,
1470
+ "link": true,
1471
+ "linkTargetBlank": true,
1472
+ "linkTooltip": "View data per this Controller Action",
1473
+ "linkUrl": "/d/$ACTION_DASHBOARD_UID/ruby-on-rails-performance-per-action?var-Action=${__cell}&from=$__from&to=$__to",
1474
+ "mappingType": 1,
1475
+ "pattern": "location",
1476
+ "thresholds": [],
1477
+ "type": "number",
1478
+ "unit": "short"
1479
+ },
1480
+ {
1481
+ "alias": "Name of the operation",
1482
+ "colorMode": null,
1483
+ "colors": [
1484
+ "rgba(245, 54, 54, 0.9)",
1485
+ "rgba(237, 129, 40, 0.89)",
1486
+ "rgba(50, 172, 45, 0.97)"
1487
+ ],
1488
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1489
+ "decimals": 2,
1490
+ "mappingType": 1,
1491
+ "pattern": "name",
1492
+ "thresholds": [],
1493
+ "type": "number",
1494
+ "unit": "short"
1495
+ },
1496
+ {
1497
+ "alias": "Maximum",
1498
+ "colorMode": null,
1499
+ "colors": [
1500
+ "rgba(245, 54, 54, 0.9)",
1501
+ "rgba(237, 129, 40, 0.89)",
1502
+ "rgba(50, 172, 45, 0.97)"
1503
+ ],
1504
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1505
+ "decimals": 2,
1506
+ "mappingType": 1,
1507
+ "pattern": "max",
1508
+ "thresholds": [],
1509
+ "type": "number",
1510
+ "unit": "ms"
1511
+ },
1512
+ {
1513
+ "alias": "",
1514
+ "colorMode": null,
1515
+ "colors": [
1516
+ "rgba(245, 54, 54, 0.9)",
1517
+ "rgba(237, 129, 40, 0.89)",
1518
+ "rgba(50, 172, 45, 0.97)"
1519
+ ],
1520
+ "decimals": 2,
1521
+ "pattern": "/.*/",
1522
+ "thresholds": [],
1523
+ "type": "number",
1524
+ "unit": "short"
1525
+ }
1526
+ ],
1527
+ "targets": [
1528
+ {
1529
+ "groupBy": [
1530
+ {
1531
+ "params": [
1532
+ "name"
1533
+ ],
1534
+ "type": "tag"
1535
+ },
1536
+ {
1537
+ "params": [
1538
+ "location"
1539
+ ],
1540
+ "type": "tag"
1541
+ }
1542
+ ],
1543
+ "measurement": "rails",
1544
+ "orderByTime": "ASC",
1545
+ "policy": "default",
1546
+ "refId": "A",
1547
+ "resultFormat": "table",
1548
+ "select": [
1549
+ [
1550
+ {
1551
+ "params": [
1552
+ "value"
1553
+ ],
1554
+ "type": "field"
1555
+ },
1556
+ {
1557
+ "params": [],
1558
+ "type": "count"
1559
+ }
1560
+ ],
1561
+ [
1562
+ {
1563
+ "params": [
1564
+ "value"
1565
+ ],
1566
+ "type": "field"
1567
+ },
1568
+ {
1569
+ "params": [],
1570
+ "type": "mean"
1571
+ }
1572
+ ],
1573
+ [
1574
+ {
1575
+ "params": [
1576
+ "value"
1577
+ ],
1578
+ "type": "field"
1579
+ },
1580
+ {
1581
+ "params": [],
1582
+ "type": "median"
1583
+ }
1584
+ ],
1585
+ [
1586
+ {
1587
+ "params": [
1588
+ "value"
1589
+ ],
1590
+ "type": "field"
1591
+ },
1592
+ {
1593
+ "params": [],
1594
+ "type": "max"
1595
+ }
1596
+ ]
1597
+ ],
1598
+ "tags": [
1599
+ {
1600
+ "key": "hook",
1601
+ "operator": "=",
1602
+ "value": "sql"
1603
+ }
1604
+ ]
1605
+ }
1606
+ ],
1607
+ "title": "By Database Query",
1608
+ "transform": "table",
1609
+ "type": "table"
1610
+ },
1611
+ {
1612
+ "columns": [],
1613
+ "datasource": "InfluxDB",
1614
+ "description": "Data for the selected range by view rendering.\n\n- Count: Number of occurrences\n- Mean: Average time spent\n- Median: Median time spent\n- Maximum: Slowest occurrence\n\n[Average vs. Median?](https://www.differencebetween.com/difference-between-mean-and-median/)",
1615
+ "fontSize": "100%",
1616
+ "gridPos": {
1617
+ "h": 13,
1618
+ "w": 12,
1619
+ "x": 0,
1620
+ "y": 25
1621
+ },
1622
+ "id": 27,
1623
+ "links": [],
1624
+ "options": {},
1625
+ "pageSize": null,
1626
+ "scroll": true,
1627
+ "showHeader": true,
1628
+ "sort": {
1629
+ "col": 5,
1630
+ "desc": true
1631
+ },
1632
+ "styles": [
1633
+ {
1634
+ "alias": "Time",
1635
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1636
+ "pattern": "Time",
1637
+ "type": "hidden"
1638
+ },
1639
+ {
1640
+ "alias": "Count",
1641
+ "colorMode": null,
1642
+ "colors": [
1643
+ "rgba(245, 54, 54, 0.9)",
1644
+ "rgba(237, 129, 40, 0.89)",
1645
+ "rgba(50, 172, 45, 0.97)"
1646
+ ],
1647
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1648
+ "decimals": 0,
1649
+ "mappingType": 1,
1650
+ "pattern": "count",
1651
+ "thresholds": [],
1652
+ "type": "number",
1653
+ "unit": "short"
1654
+ },
1655
+ {
1656
+ "alias": "Mean",
1657
+ "colorMode": null,
1658
+ "colors": [
1659
+ "rgba(245, 54, 54, 0.9)",
1660
+ "rgba(237, 129, 40, 0.89)",
1661
+ "rgba(50, 172, 45, 0.97)"
1662
+ ],
1663
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1664
+ "decimals": 2,
1665
+ "mappingType": 1,
1666
+ "pattern": "mean",
1667
+ "thresholds": [],
1668
+ "type": "number",
1669
+ "unit": "ms"
1670
+ },
1671
+ {
1672
+ "alias": "Median",
1673
+ "colorMode": null,
1674
+ "colors": [
1675
+ "rgba(245, 54, 54, 0.9)",
1676
+ "rgba(237, 129, 40, 0.89)",
1677
+ "rgba(50, 172, 45, 0.97)"
1678
+ ],
1679
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1680
+ "decimals": 2,
1681
+ "mappingType": 1,
1682
+ "pattern": "median",
1683
+ "thresholds": [],
1684
+ "type": "number",
1685
+ "unit": "ms"
1686
+ },
1687
+ {
1688
+ "alias": "Maximum",
1689
+ "colorMode": null,
1690
+ "colors": [
1691
+ "rgba(245, 54, 54, 0.9)",
1692
+ "rgba(237, 129, 40, 0.89)",
1693
+ "rgba(50, 172, 45, 0.97)"
1694
+ ],
1695
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1696
+ "decimals": 2,
1697
+ "mappingType": 1,
1698
+ "pattern": "max",
1699
+ "thresholds": [],
1700
+ "type": "number",
1701
+ "unit": "ms"
1702
+ },
1703
+ {
1704
+ "alias": "View",
1705
+ "colorMode": null,
1706
+ "colors": [
1707
+ "rgba(245, 54, 54, 0.9)",
1708
+ "rgba(237, 129, 40, 0.89)",
1709
+ "rgba(50, 172, 45, 0.97)"
1710
+ ],
1711
+ "decimals": 2,
1712
+ "pattern": "/.*/",
1713
+ "thresholds": [],
1714
+ "type": "number",
1715
+ "unit": "short"
1716
+ }
1717
+ ],
1718
+ "targets": [
1719
+ {
1720
+ "groupBy": [
1721
+ {
1722
+ "params": [
1723
+ "filename"
1724
+ ],
1725
+ "type": "tag"
1726
+ }
1727
+ ],
1728
+ "measurement": "rails",
1729
+ "orderByTime": "ASC",
1730
+ "policy": "default",
1731
+ "refId": "A",
1732
+ "resultFormat": "table",
1733
+ "select": [
1734
+ [
1735
+ {
1736
+ "params": [
1737
+ "value"
1738
+ ],
1739
+ "type": "field"
1740
+ },
1741
+ {
1742
+ "params": [],
1743
+ "type": "count"
1744
+ }
1745
+ ],
1746
+ [
1747
+ {
1748
+ "params": [
1749
+ "value"
1750
+ ],
1751
+ "type": "field"
1752
+ },
1753
+ {
1754
+ "params": [],
1755
+ "type": "mean"
1756
+ }
1757
+ ],
1758
+ [
1759
+ {
1760
+ "params": [
1761
+ "value"
1762
+ ],
1763
+ "type": "field"
1764
+ },
1765
+ {
1766
+ "params": [],
1767
+ "type": "median"
1768
+ }
1769
+ ],
1770
+ [
1771
+ {
1772
+ "params": [
1773
+ "value"
1774
+ ],
1775
+ "type": "field"
1776
+ },
1777
+ {
1778
+ "params": [],
1779
+ "type": "max"
1780
+ }
1781
+ ]
1782
+ ],
1783
+ "tags": [
1784
+ {
1785
+ "key": "hook",
1786
+ "operator": "=",
1787
+ "value": "render_template"
1788
+ }
1789
+ ]
1790
+ }
1791
+ ],
1792
+ "title": "By View Rendering",
1793
+ "transform": "table",
1794
+ "type": "table"
1795
+ },
1796
+ {
1797
+ "columns": [],
1798
+ "datasource": "InfluxDB",
1799
+ "description": "Data for the selected range by request ID.\n\n- Maximum: Slowest occurrence",
1800
+ "fontSize": "100%",
1801
+ "gridPos": {
1802
+ "h": 13,
1803
+ "w": 12,
1804
+ "x": 12,
1805
+ "y": 25
1806
+ },
1807
+ "id": 33,
1808
+ "links": [],
1809
+ "options": {},
1810
+ "pageSize": null,
1811
+ "scroll": true,
1812
+ "showHeader": true,
1813
+ "sort": {
1814
+ "col": 4,
1815
+ "desc": true
1816
+ },
1817
+ "styles": [
1818
+ {
1819
+ "alias": "Finished",
1820
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1821
+ "pattern": "Time",
1822
+ "type": "hidden"
1823
+ },
1824
+ {
1825
+ "alias": "Started",
1826
+ "colorMode": null,
1827
+ "colors": [
1828
+ "rgba(245, 54, 54, 0.9)",
1829
+ "rgba(237, 129, 40, 0.89)",
1830
+ "rgba(50, 172, 45, 0.97)"
1831
+ ],
1832
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1833
+ "decimals": 2,
1834
+ "pattern": "started",
1835
+ "thresholds": [],
1836
+ "type": "hidden",
1837
+ "unit": "short"
1838
+ },
1839
+ {
1840
+ "alias": "Maximum",
1841
+ "colorMode": null,
1842
+ "colors": [
1843
+ "rgba(245, 54, 54, 0.9)",
1844
+ "rgba(237, 129, 40, 0.89)",
1845
+ "rgba(50, 172, 45, 0.97)"
1846
+ ],
1847
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1848
+ "decimals": 2,
1849
+ "mappingType": 1,
1850
+ "pattern": "max",
1851
+ "thresholds": [],
1852
+ "type": "number",
1853
+ "unit": "ms"
1854
+ },
1855
+ {
1856
+ "alias": "Request ID",
1857
+ "colorMode": null,
1858
+ "colors": [
1859
+ "rgba(245, 54, 54, 0.9)",
1860
+ "rgba(237, 129, 40, 0.89)",
1861
+ "rgba(50, 172, 45, 0.97)"
1862
+ ],
1863
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1864
+ "decimals": 2,
1865
+ "link": true,
1866
+ "linkTargetBlank": false,
1867
+ "linkTooltip": "View data per this Request",
1868
+ "linkUrl": "/d/$REQUEST_DASHBOARD_UID/ruby-on-rails-performance-per-request?var-request_id=${__cell}&from=${__cell_2}&to=${__cell_0}&var-method=${__cell_1}",
1869
+ "mappingType": 1,
1870
+ "pattern": "request_id",
1871
+ "thresholds": [],
1872
+ "type": "string",
1873
+ "unit": "short"
1874
+ },
1875
+ {
1876
+ "alias": "Controller Action",
1877
+ "colorMode": null,
1878
+ "colors": [
1879
+ "rgba(245, 54, 54, 0.9)",
1880
+ "rgba(237, 129, 40, 0.89)",
1881
+ "rgba(50, 172, 45, 0.97)"
1882
+ ],
1883
+ "dateFormat": "YYYY-MM-DD HH:mm:ss",
1884
+ "decimals": 2,
1885
+ "link": true,
1886
+ "linkTargetBlank": true,
1887
+ "linkTooltip": "View data per this Controller Action",
1888
+ "linkUrl": "/d/$ACTION_DASHBOARD_UID/ruby-on-rails-performance-per-action?var-Action=${__cell}&from=$__from&to=$__to",
1889
+ "mappingType": 1,
1890
+ "pattern": "method",
1891
+ "thresholds": [],
1892
+ "type": "number",
1893
+ "unit": "short"
1894
+ }
1895
+ ],
1896
+ "targets": [
1897
+ {
1898
+ "groupBy": [
1899
+ {
1900
+ "params": [
1901
+ "method"
1902
+ ],
1903
+ "type": "tag"
1904
+ }
1905
+ ],
1906
+ "limit": "20",
1907
+ "measurement": "rails",
1908
+ "orderByTime": "ASC",
1909
+ "policy": "default",
1910
+ "refId": "A",
1911
+ "resultFormat": "table",
1912
+ "select": [
1913
+ [
1914
+ {
1915
+ "params": [
1916
+ "started"
1917
+ ],
1918
+ "type": "field"
1919
+ }
1920
+ ],
1921
+ [
1922
+ {
1923
+ "params": [
1924
+ "request_id"
1925
+ ],
1926
+ "type": "field"
1927
+ }
1928
+ ],
1929
+ [
1930
+ {
1931
+ "params": [
1932
+ "controller"
1933
+ ],
1934
+ "type": "field"
1935
+ },
1936
+ {
1937
+ "params": [],
1938
+ "type": "max"
1939
+ }
1940
+ ]
1941
+ ],
1942
+ "tags": [
1943
+ {
1944
+ "key": "hook",
1945
+ "operator": "=",
1946
+ "value": "process_action"
1947
+ }
1948
+ ]
1949
+ }
1950
+ ],
1951
+ "title": "By Request ID",
1952
+ "transform": "table",
1953
+ "type": "table"
1954
+ }
1955
+ ],
1956
+ "refresh": "5m",
1957
+ "schemaVersion": 18,
1958
+ "style": "dark",
1959
+ "tags": [
1960
+ "performance",
1961
+ "ruby on rails",
1962
+ "influxdb"
1963
+ ],
1964
+ "templating": {
1965
+ "list": [
1966
+ {
1967
+ "allValue": null,
1968
+ "current": {
1969
+ "text": "H8S9fSVWz",
1970
+ "value": "H8S9fSVWz"
1971
+ },
1972
+ "hide": 2,
1973
+ "includeAll": false,
1974
+ "label": null,
1975
+ "multi": false,
1976
+ "name": "REQUEST_DASHBOARD_UID",
1977
+ "options": [
1978
+ {
1979
+ "selected": true,
1980
+ "text": "H8S9fSVWz",
1981
+ "value": "H8S9fSVWz"
1982
+ }
1983
+ ],
1984
+ "query": "H8S9fSVWz",
1985
+ "skipUrlSync": false,
1986
+ "type": "custom"
1987
+ },
1988
+ {
1989
+ "current": {
1990
+ "value": "Gpp3B1Pik",
1991
+ "text": "Gpp3B1Pik"
1992
+ },
1993
+ "hide": 2,
1994
+ "label": null,
1995
+ "name": "ACTION_DASHBOARD_UID",
1996
+ "options": [
1997
+ {
1998
+ "value": "Gpp3B1Pik",
1999
+ "text": "Gpp3B1Pik"
2000
+ }
2001
+ ],
2002
+ "query": "Gpp3B1Pik",
2003
+ "skipUrlSync": false,
2004
+ "type": "constant"
2005
+ }
2006
+ ]
2007
+ },
2008
+ "time": {
2009
+ "from": "now-1h",
2010
+ "to": "now"
2011
+ },
2012
+ "timepicker": {
2013
+ "refresh_intervals": [
2014
+ "5s",
2015
+ "10s",
2016
+ "30s",
2017
+ "1m",
2018
+ "5m",
2019
+ "15m",
2020
+ "30m",
2021
+ "1h",
2022
+ "2h",
2023
+ "1d"
2024
+ ],
2025
+ "time_options": [
2026
+ "5m",
2027
+ "15m",
2028
+ "1h",
2029
+ "6h",
2030
+ "12h",
2031
+ "24h",
2032
+ "2d",
2033
+ "7d",
2034
+ "30d"
2035
+ ]
2036
+ },
2037
+ "timezone": "",
2038
+ "title": "Ruby On Rails Performance Overview",
2039
+ "uid": "K2CJtIVZz",
2040
+ "version": 1
2041
+ }