process_metrics_activerecord 0.1.9 → 0.1.10
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: 8daa85c0caddd3082bc97bcc30fbe6472f2e80fe
|
4
|
+
data.tar.gz: 4165e55b81f9282fe9ce56acae4a824e0237a90e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c374d7c1c51dd2360bbd09c8158a9d23ab172b2c196ddb5323d3a79ec7b49cf887ac5f7525b959402dbe23ea8689d8eb6be8a6ab745df44a7efcec4e052aadb8
|
7
|
+
data.tar.gz: 526c00524fcc377e86e660bada2097b8377f699b8da0fcc8abca48ea9dd87cfcbd390dde681d3995d6c53909045d9622c58d4349e3b1b6cde8ea7dc7a8f259e2
|
@@ -29,6 +29,9 @@ module ProcessMetrics
|
|
29
29
|
begin
|
30
30
|
::ActiveRecord::Base.connection_pool.with_connection do
|
31
31
|
metric_attributes = metric.attributes.with_indifferent_access
|
32
|
+
|
33
|
+
Metric.find_or_create_by_parent_uuid metric_attributes[:parent_uuid] if metric_attributes[:parent_uuid]
|
34
|
+
|
32
35
|
metric = Metric.new
|
33
36
|
metric.uuid = metric_attributes[:uuid]
|
34
37
|
metric.parent_uuid = metric_attributes[:parent_uuid]
|
data/test/test_simple.rb
CHANGED
@@ -7,9 +7,13 @@ ProcessMetrics::Persistence::ActiveRecord.connection = {
|
|
7
7
|
database: "process_metrics_test.sqlite3"
|
8
8
|
}
|
9
9
|
|
10
|
+
ActiveRecord::Base.logger = ProcessMetrics.config.logger
|
11
|
+
|
10
12
|
# ProcessMetrics::Persistence::ActiveRecord.table_name = 'onon'
|
13
|
+
# ProcessMetrics::Persistence::ActiveRecord.drop!
|
11
14
|
ProcessMetrics::Persistence::ActiveRecord.setup!
|
12
15
|
|
16
|
+
|
13
17
|
class MyClass
|
14
18
|
include ProcessMetrics::Timer
|
15
19
|
measure :do_simple_work,
|
@@ -99,6 +103,7 @@ class MyChildStringClass
|
|
99
103
|
end
|
100
104
|
end
|
101
105
|
|
106
|
+
|
102
107
|
class TestBlock < Minitest::Test
|
103
108
|
def test_unfinished_job
|
104
109
|
my_object = MyClass.new(1)
|
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.10
|
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-
|
11
|
+
date: 2014-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: '0.1'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.1.
|
42
|
+
version: 0.1.10
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: '0.1'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: 0.1.
|
52
|
+
version: 0.1.10
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: minitest
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|