remnant 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ vendor/
2
+ .bundle/
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 1.8.7-p375
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remnant (0.3.2)
4
+ remnant (0.4.5)
5
5
  statsd-ruby (= 1.0.0)
6
6
 
7
7
  GEM
data/lib/remnant.rb CHANGED
@@ -7,6 +7,7 @@ require 'remnant/discover'
7
7
  require 'remnant/gc'
8
8
  require 'remnant/gc/base'
9
9
  require 'remnant/gc/ree'
10
+ require 'remnant/gc/mri'
10
11
 
11
12
  require 'remnant/filters'
12
13
 
data/lib/remnant/gc.rb CHANGED
@@ -30,10 +30,14 @@ class Remnant
30
30
  end
31
31
 
32
32
  def _gc_implementation
33
- if ::GC.respond_to?(:time) && ::GC.respond_to?(:collections)
34
- Remnant::GC::Ree
33
+ if RUBY_VERSION >= '2.1.0'
34
+ Remnant::GC::Mri
35
35
  else
36
- Remnant::GC::Base
36
+ if ::GC.respond_to?(:time) && ::GC.respond_to?(:collections)
37
+ Remnant::GC::Ree
38
+ else
39
+ Remnant::GC::Base
40
+ end
37
41
  end
38
42
  end
39
43
  end
@@ -0,0 +1,33 @@
1
+ class Remnant
2
+ class GC
3
+ class Mri
4
+ module ClassMethods
5
+ def enabled?
6
+ true
7
+ end
8
+
9
+ def time
10
+ # returns time in seconds, so convert to ms
11
+ ::GC::Profiler.total_time * 1000
12
+ end
13
+
14
+ def collections
15
+ ::GC::Profiler.raw_data.try(:size) || 0
16
+ end
17
+
18
+ def enable_stats
19
+ ::GC::Profiler.enable
20
+ end
21
+
22
+ def disable_stats
23
+ ::GC::Profiler.disable
24
+ end
25
+
26
+ def clear_stats
27
+ ::GC::Profiler.clear
28
+ end
29
+ end
30
+ extend ClassMethods
31
+ end
32
+ end
33
+ end
@@ -1,3 +1,3 @@
1
1
  class Remnant
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -9,8 +9,8 @@ RSpec.configure do |config|
9
9
  config.mock_with :rr
10
10
  end
11
11
 
12
- require 'action_controller'
13
12
  require 'active_support'
13
+ require 'action_controller'
14
14
 
15
15
  require 'remnant'
16
16
 
metadata CHANGED
@@ -1,136 +1,141 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: remnant
3
- version: !ruby/object:Gem::Version
4
- version: 0.4.4
3
+ version: !ruby/object:Gem::Version
4
+ hash: 5
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 4
9
+ - 5
10
+ version: 0.4.5
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - John 'asceth' Long
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-07-23 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2015-03-10 00:00:00 -04:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: statsd-ruby
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - '='
20
- - !ruby/object:Gem::Version
21
- version: 1.0.0
22
- type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
- requirements:
27
- - - '='
28
- - !ruby/object:Gem::Version
26
+ requirements:
27
+ - - "="
28
+ - !ruby/object:Gem::Version
29
+ hash: 23
30
+ segments:
31
+ - 1
32
+ - 0
33
+ - 0
29
34
  version: 1.0.0
30
- - !ruby/object:Gem::Dependency
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
31
38
  name: actionpack
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: 2.3.8
38
- type: :development
39
39
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
41
  none: false
42
- requirements:
42
+ requirements:
43
43
  - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 2.3.8
46
- - !ruby/object:Gem::Dependency
47
- name: activerecord
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
44
+ - !ruby/object:Gem::Version
45
+ hash: 19
46
+ segments:
47
+ - 2
48
+ - 3
49
+ - 8
53
50
  version: 2.3.8
54
51
  type: :development
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: activerecord
55
55
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 2.3.8
62
- - !ruby/object:Gem::Dependency
63
- name: activesupport
64
- requirement: !ruby/object:Gem::Requirement
56
+ requirement: &id003 !ruby/object:Gem::Requirement
65
57
  none: false
66
- requirements:
58
+ requirements:
67
59
  - - ~>
68
- - !ruby/object:Gem::Version
60
+ - !ruby/object:Gem::Version
61
+ hash: 19
62
+ segments:
63
+ - 2
64
+ - 3
65
+ - 8
69
66
  version: 2.3.8
70
67
  type: :development
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: activesupport
71
71
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
73
  none: false
74
- requirements:
74
+ requirements:
75
75
  - - ~>
76
- - !ruby/object:Gem::Version
76
+ - !ruby/object:Gem::Version
77
+ hash: 19
78
+ segments:
79
+ - 2
80
+ - 3
81
+ - 8
77
82
  version: 2.3.8
78
- - !ruby/object:Gem::Dependency
79
- name: rake
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
83
  type: :development
84
+ version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
86
+ name: rake
87
87
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
89
  none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- - !ruby/object:Gem::Dependency
95
- name: rspec
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: '0'
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ hash: 3
94
+ segments:
95
+ - 0
96
+ version: "0"
102
97
  type: :development
98
+ version_requirements: *id005
99
+ - !ruby/object:Gem::Dependency
100
+ name: rspec
103
101
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
102
+ requirement: &id006 !ruby/object:Gem::Requirement
105
103
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
109
- version: '0'
110
- - !ruby/object:Gem::Dependency
111
- name: rr
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ hash: 3
108
+ segments:
109
+ - 0
110
+ version: "0"
118
111
  type: :development
112
+ version_requirements: *id006
113
+ - !ruby/object:Gem::Dependency
114
+ name: rr
119
115
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
116
+ requirement: &id007 !ruby/object:Gem::Requirement
121
117
  none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
126
- description: Remnant - peering into your ruby apps and discovering statistics you
127
- never knew could be so awful...
128
- email:
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ hash: 3
122
+ segments:
123
+ - 0
124
+ version: "0"
125
+ type: :development
126
+ version_requirements: *id007
127
+ description: Remnant - peering into your ruby apps and discovering statistics you never knew could be so awful...
128
+ email:
129
129
  - machinist@asceth.com
130
130
  executables: []
131
+
131
132
  extensions: []
133
+
132
134
  extra_rdoc_files: []
133
- files:
135
+
136
+ files:
137
+ - .gitignore
138
+ - .ruby-version
134
139
  - .rvmrc
135
140
  - Gemfile
136
141
  - Gemfile.lock
@@ -146,6 +151,7 @@ files:
146
151
  - lib/remnant/filters.rb
147
152
  - lib/remnant/gc.rb
148
153
  - lib/remnant/gc/base.rb
154
+ - lib/remnant/gc/mri.rb
149
155
  - lib/remnant/gc/ree.rb
150
156
  - lib/remnant/rails.rb
151
157
  - lib/remnant/railtie.rb
@@ -160,31 +166,41 @@ files:
160
166
  - spec/discover_spec.rb
161
167
  - spec/spec_helper.rb
162
168
  - spec/support/rr.rb
169
+ has_rdoc: true
163
170
  homepage: https://github.com/asceth/remnant
164
171
  licenses: []
172
+
165
173
  post_install_message:
166
174
  rdoc_options: []
167
- require_paths:
175
+
176
+ require_paths:
168
177
  - lib
169
- required_ruby_version: !ruby/object:Gem::Requirement
178
+ required_ruby_version: !ruby/object:Gem::Requirement
170
179
  none: false
171
- requirements:
172
- - - ! '>='
173
- - !ruby/object:Gem::Version
174
- version: '0'
175
- required_rubygems_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ hash: 3
184
+ segments:
185
+ - 0
186
+ version: "0"
187
+ required_rubygems_version: !ruby/object:Gem::Requirement
176
188
  none: false
177
- requirements:
178
- - - ! '>='
179
- - !ruby/object:Gem::Version
180
- version: '0'
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ hash: 3
193
+ segments:
194
+ - 0
195
+ version: "0"
181
196
  requirements: []
197
+
182
198
  rubyforge_project: remnant
183
- rubygems_version: 1.8.23
199
+ rubygems_version: 1.6.2
184
200
  signing_key:
185
201
  specification_version: 3
186
202
  summary: Rails statistical discoverer
187
- test_files:
203
+ test_files:
188
204
  - spec/app/some/klass.rb
189
205
  - spec/app/some/module.rb
190
206
  - spec/base_spec.rb