process_metrics 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: 70fd24224d5d1072a600ec3b91646b80e1f08fb4
4
- data.tar.gz: 0c25d96e95f9c654a3f89b02a52cb7707ed7a8d2
3
+ metadata.gz: 189b72f4713bbe95ffa5a6c2b0b7cae1a2cab7cd
4
+ data.tar.gz: 88f03b1538c2bafb8fd5d54ae5851b8e8a665951
5
5
  SHA512:
6
- metadata.gz: 28faddd163f40ceb8a9280a2156ace28c916d0d836243b758f06ac10b005bc9d698c00032a497db1fd88af43d20b3b7e0a408e446c827554ef8861c7f7ce95ad
7
- data.tar.gz: 6abef7ff7a8f63d0d47ffdbebf1920c129766a730ad39bb080027d1c8de03dd4431e6d7baa24d6a12b4f25a65bc786df21e8a6767107cc57ca86950a05c5c5f6
6
+ metadata.gz: 83b71690117e9fe9618d9dc88bfdd4a00754d63bf77ccaae6f2955016421fcfc28399fe468b3267661521f4ae36e1c1eb63795dcdf2c622cdfc4d34365130228
7
+ data.tar.gz: 400437c912e5a169a17638504f53db0dc45dd6a08a68188cddbda5b787289bb1c25edf8484a117e5f3ba2268d0546f900ebf3ad106cc010a45f78adb65863bc3
@@ -42,15 +42,13 @@ module ProcessMetrics
42
42
  end
43
43
 
44
44
  def self.work(name, parent=nil, &block)
45
-
46
45
  metric = ProcessMetrics::Base.new name, parent
47
46
  result = nil
48
47
  begin
49
48
  result = block.call metric
50
49
  metric.finish
51
50
  ensure
52
- Celluloid.internal_pool = Celluloid::InternalPool.new
53
- SaveJob.new.async.perform metric
51
+ Thread.new(metric) { |_metric| _metric.save }.join
54
52
  end
55
53
  result
56
54
  end
@@ -1,2 +1 @@
1
1
  require 'process_metrics/persistence/logger'
2
- require 'process_metrics/persistence/save_job'
@@ -1,3 +1,3 @@
1
1
  module ProcessMetrics
2
- VERSION = "0.1.9"
2
+ VERSION = "0.1.10"
3
3
  end
data/test/test_simple.rb CHANGED
@@ -94,7 +94,7 @@ end
94
94
  class TestBlock < Minitest::Test
95
95
  def test_unfinished_job
96
96
  my_object = MyClass.new(1)
97
- my_object.do_terrible_work rescue nil
97
+ assert_raises(RuntimeError) { my_object.do_terrible_work }
98
98
  end
99
99
 
100
100
  def test_simple_method
metadata CHANGED
@@ -1,93 +1,73 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
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-03-27 00:00:00.000000000 Z
11
+ date: 2014-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hashie
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.0'
20
- - - ">="
20
+ - - '>='
21
21
  - !ruby/object:Gem::Version
22
22
  version: 2.0.5
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - "~>"
27
+ - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: '2.0'
30
- - - ">="
30
+ - - '>='
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.0.5
33
- - !ruby/object:Gem::Dependency
34
- name: sucker_punch
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.0'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 1.0.2
43
- type: :runtime
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '1.0'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 1.0.2
53
33
  - !ruby/object:Gem::Dependency
54
34
  name: pry-debugger
55
35
  requirement: !ruby/object:Gem::Requirement
56
36
  requirements:
57
- - - "~>"
37
+ - - ~>
58
38
  - !ruby/object:Gem::Version
59
39
  version: '0.2'
60
- - - ">="
40
+ - - '>='
61
41
  - !ruby/object:Gem::Version
62
42
  version: 0.2.2
63
43
  type: :development
64
44
  prerelease: false
65
45
  version_requirements: !ruby/object:Gem::Requirement
66
46
  requirements:
67
- - - "~>"
47
+ - - ~>
68
48
  - !ruby/object:Gem::Version
69
49
  version: '0.2'
70
- - - ">="
50
+ - - '>='
71
51
  - !ruby/object:Gem::Version
72
52
  version: 0.2.2
73
53
  - !ruby/object:Gem::Dependency
74
54
  name: minitest
75
55
  requirement: !ruby/object:Gem::Requirement
76
56
  requirements:
77
- - - "~>"
57
+ - - ~>
78
58
  - !ruby/object:Gem::Version
79
59
  version: '5.3'
80
- - - ">="
60
+ - - '>='
81
61
  - !ruby/object:Gem::Version
82
62
  version: 5.3.1
83
63
  type: :development
84
64
  prerelease: false
85
65
  version_requirements: !ruby/object:Gem::Requirement
86
66
  requirements:
87
- - - "~>"
67
+ - - ~>
88
68
  - !ruby/object:Gem::Version
89
69
  version: '5.3'
90
- - - ">="
70
+ - - '>='
91
71
  - !ruby/object:Gem::Version
92
72
  version: 5.3.1
93
73
  description: A gem that provides utilities to measure a process and its sub tasks.
@@ -103,7 +83,6 @@ files:
103
83
  - lib/process_metrics/config.rb
104
84
  - lib/process_metrics/persistence.rb
105
85
  - lib/process_metrics/persistence/logger.rb
106
- - lib/process_metrics/persistence/save_job.rb
107
86
  - lib/process_metrics/timer.rb
108
87
  - lib/process_metrics/version.rb
109
88
  - test/test_simple.rb
@@ -113,22 +92,22 @@ licenses:
113
92
  metadata: {}
114
93
  post_install_message:
115
94
  rdoc_options:
116
- - "--charset=UTF-8"
95
+ - --charset=UTF-8
117
96
  require_paths:
118
97
  - lib
119
98
  required_ruby_version: !ruby/object:Gem::Requirement
120
99
  requirements:
121
- - - ">="
100
+ - - '>='
122
101
  - !ruby/object:Gem::Version
123
102
  version: '0'
124
103
  required_rubygems_version: !ruby/object:Gem::Requirement
125
104
  requirements:
126
- - - ">="
105
+ - - '>='
127
106
  - !ruby/object:Gem::Version
128
107
  version: '0'
129
108
  requirements: []
130
109
  rubyforge_project:
131
- rubygems_version: 2.2.2
110
+ rubygems_version: 2.0.14
132
111
  signing_key:
133
112
  specification_version: 4
134
113
  summary: Process metrics
@@ -1,10 +0,0 @@
1
- require 'sucker_punch'
2
-
3
- class SaveJob
4
- include SuckerPunch::Job
5
- workers 4
6
-
7
- def perform(metric)
8
- metric.save
9
- end
10
- end