rails_performance 1.2.0.alpha2 → 1.2.0.alpha3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4cc5606eeacc1d036f322a9eda07cea2d2151c23ad96052f2e7a695ea288e5a
|
4
|
+
data.tar.gz: 51fe7e76287eb361e0d2135039f4f95c03f559ca575bae8883b1a94c107762e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc80d1c5713b87b6338778086bc6b4180f36bfd9d38b96753bf92e733f985fa9101ea53c8a426a0cf41c1916dc83266d7f53868b2ceaf6aa4c7c7be11f3ab158
|
7
|
+
data.tar.gz: 8a54a10c63673d143fe07cfddf03db2000d6f957b3d913edfebf5f0c06f598c5808732dedbb0e3b37e4b280cd00f21b5ba21dbe36248103c5f930015870e81f9
|
@@ -7,10 +7,10 @@ module RailsPerformance
|
|
7
7
|
|
8
8
|
def data
|
9
9
|
all = {}
|
10
|
-
stop = Time.at(60 * (Time.now.to_i / 60))
|
10
|
+
stop = RailsPerformance::Reports::BaseReport::time_in_app_time_zone(Time.at(60 * (Time.now.to_i / 60)))
|
11
|
+
offset = RailsPerformance::Reports::BaseReport::time_in_app_time_zone(Time.now).utc_offset
|
11
12
|
current = stop - RailsPerformance.duration
|
12
13
|
@data = []
|
13
|
-
offset = Time.now.utc_offset
|
14
14
|
|
15
15
|
# puts "current: #{current}"
|
16
16
|
# puts "stop: #{stop}"
|
@@ -25,8 +25,8 @@ module RailsPerformance
|
|
25
25
|
# add blank columns
|
26
26
|
while current <= stop
|
27
27
|
views = all[current.strftime(RailsPerformance::FORMAT)] || 0
|
28
|
-
time = RailsPerformance::Reports::
|
29
|
-
@data << [(
|
28
|
+
# time = RailsPerformance::Reports::BaseReport::time_in_app_time_zone(current)
|
29
|
+
@data << [(current.to_i + offset) * 1000, views.round(2)]
|
30
30
|
current += 1.minute
|
31
31
|
end
|
32
32
|
|
@@ -6,12 +6,15 @@ module RailsPerformance
|
|
6
6
|
@group ||= :datetime
|
7
7
|
end
|
8
8
|
|
9
|
+
# RailsPerformance::Reports::ThroughputReport.new(db).data
|
10
|
+
# Time.at(RailsPerformance::Reports::ThroughputReport.new(db).data.last[0] / 1000)
|
11
|
+
|
9
12
|
def data
|
10
13
|
all = {}
|
11
|
-
stop = Time.at(60 * (Time.now.to_i / 60))
|
14
|
+
stop = RailsPerformance::Reports::BaseReport::time_in_app_time_zone(Time.at(60 * (Time.now.to_i / 60)))
|
15
|
+
offset = RailsPerformance::Reports::BaseReport::time_in_app_time_zone(Time.now).utc_offset
|
12
16
|
current = stop - RailsPerformance.duration
|
13
17
|
@data = []
|
14
|
-
offset = Time.now.utc_offset
|
15
18
|
|
16
19
|
# puts "current: #{current}"
|
17
20
|
# puts "stop: #{stop}"
|
@@ -24,8 +27,7 @@ module RailsPerformance
|
|
24
27
|
# add blank columns
|
25
28
|
while current <= stop
|
26
29
|
views = all[current.strftime(RailsPerformance::FORMAT)] || 0
|
27
|
-
|
28
|
-
@data << [(time.to_i + offset) * 1000, views.round(2)]
|
30
|
+
@data << [(current.to_i + offset) * 1000, views.round(2)]
|
29
31
|
current += 1.minute
|
30
32
|
end
|
31
33
|
|