process_metrics_activerecord 0.1.11 → 0.1.12
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e40ed357f1cb993b8b00cd23508364b3dc45e88d
|
4
|
+
data.tar.gz: 93ae206eadcfc6161a3fed85515dd4e7e7d9f877
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38c3a4df122ae2712469fb1ff395b9ae45729e09658e8a851b8dccf3935bb147d4cefba7b32630558787ae150b3ec9fba5879dd4e68374a1670debe6f6c5c3f0
|
7
|
+
data.tar.gz: 316d978c37013bb890d1a81d11f8ddf11b8bc552e82d552f321b863c0de1fdf2b943639a44dfa5610976880a996bb4a2ff166affa73744bb7525c358a60b3a4a
|
@@ -32,8 +32,8 @@ module ProcessMetrics
|
|
32
32
|
|
33
33
|
parent_metric = Metric.find_or_create_by_parent_uuid metric_attributes[:parent_uuid] if metric_attributes[:parent_uuid]
|
34
34
|
if parent_metric
|
35
|
-
parent_metric.started_at ||= metric_attributes[:started_at]
|
36
|
-
parent_metric.finished_at ||= metric_attributes[:finished_at]
|
35
|
+
parent_metric.started_at ||= Time.parse(metric_attributes[:started_at])
|
36
|
+
parent_metric.finished_at ||= Time.parse(metric_attributes[:finished_at])
|
37
37
|
|
38
38
|
parent_metric.started_at = metric_attributes[:started_at] if metric_attributes[:started_at] < parent_metric.started_at
|
39
39
|
parent_metric.finished_at = metric_attributes[:finished_at] if metric_attributes[:finished_at] > parent_metric.finished_at
|
data/test/test_simple.rb
CHANGED
@@ -171,4 +171,11 @@ class TestBlock < Minitest::Test
|
|
171
171
|
metric.data = { my_key: 'my_value'}
|
172
172
|
end
|
173
173
|
end
|
174
|
+
|
175
|
+
def test_children
|
176
|
+
my_object = MyChildStringClass.new(1)
|
177
|
+
3.times { my_object.do_simple_work }
|
178
|
+
|
179
|
+
assert_equal 4, my_object.my_var
|
180
|
+
end
|
174
181
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: process_metrics_activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucas Uyezu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|