inner_performance 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/inner_performance/dashboard_controller.rb +1 -4
- data/app/controllers/inner_performance/events_controller.rb +0 -1
- data/app/helpers/inner_performance/application_helper.rb +2 -0
- data/app/views/inner_performance/dashboard/index.html.erb +5 -7
- data/app/views/inner_performance/events/index.html.erb +1 -3
- data/db/migrate/20241124111458_add_type_to_inner_performance_events.rb +1 -1
- data/lib/inner_performance/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1004d3b5f389017a50676f9d515d633a3fa66b979130b81234412163f571f55
|
4
|
+
data.tar.gz: 53defa10a2601f764ce4aa556cee57b2e3e1744b6e2255bdba3e955ab44977c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13469c9d5984005716e637fbc1f144de6a978e29ca9a66583555da5c9be89d088d16488c46b08c06a83c35bf115137aadb4d27d78a36e283d4dcb9b2bec82d45
|
7
|
+
data.tar.gz: 9944293186d33a54cf4c0b0e8014eae5835a6b043749ab76fc313a2f775ca559cfb6a4445234afdb7c6df51ef6a6f12084e42eba9d5cb1f965940c0f290ba8c8
|
@@ -1,10 +1,7 @@
|
|
1
1
|
module InnerPerformance
|
2
2
|
class DashboardController < ApplicationController
|
3
3
|
def index
|
4
|
-
@
|
5
|
-
@q.sorts = "created_at desc" if @q.sorts.empty?
|
6
|
-
@recent_events = @q.result.limit(100)
|
7
|
-
|
4
|
+
@recent_events = InnerPerformance::Event.all.order(id: :desc).limit(25)
|
8
5
|
@average_req_duration = InnerPerformance::Events::ProcessActionActionController.all.average(:duration)
|
9
6
|
@average_job_duration = InnerPerformance::Events::PerformActiveJob.average(:duration) || 0
|
10
7
|
@biggest_events = \
|
@@ -41,14 +41,12 @@
|
|
41
41
|
<h4 class="mt-4">Recent events</h4>
|
42
42
|
<table class="table table-hover">
|
43
43
|
<thead>
|
44
|
-
<th
|
45
|
-
<th
|
46
|
-
<th
|
47
|
-
<th class="text-end"
|
44
|
+
<th>Name</th>
|
45
|
+
<th>Duration</th>
|
46
|
+
<th>DB</th>
|
47
|
+
<th class="text-end">When</th>
|
48
48
|
</thead>
|
49
49
|
<tbody>
|
50
|
-
|
51
|
-
<%= render event.becomes(InnerPerformance::Event) %>
|
52
|
-
<% end %>
|
50
|
+
<%= render collection: @recent_events, partial: 'inner_performance/events/event', cached: true %>
|
53
51
|
</tbody>
|
54
52
|
</table>
|
@@ -21,9 +21,7 @@
|
|
21
21
|
<th class="text-end"><%= sort_link @q, :created_at, hide_indicator: true %></th>
|
22
22
|
</thead>
|
23
23
|
<tbody>
|
24
|
-
|
25
|
-
<%= render event.becomes(InnerPerformance::Event) %>
|
26
|
-
<% end %>
|
24
|
+
<%= render collection: @events, partial: 'inner_performance/events/event', cached: true %>
|
27
25
|
</tbody>
|
28
26
|
</table>
|
29
27
|
|