memory_tracker 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 994ac320836a0110fb9676434906b2313ec95e8a
4
- data.tar.gz: 203f2fe48daa01b89b75baf5197c83059f319051
3
+ metadata.gz: 2c53d6b1d44536ce0afc4bfa9597b8d6a27a06f6
4
+ data.tar.gz: 2957c835b415d60485fac488948d8d4bd3926a01
5
5
  SHA512:
6
- metadata.gz: d07f97162bbf098ccbe83130a96b5ae74c0d01a68ac83cc5ea473e44b79eaceb56b6f6fcd8c84c9c059f17007ecd00335973a2eccb3291cac0f0e919c78989e5
7
- data.tar.gz: 64c1a6e0786feb940a6d46163c0c4e948bbf367e140686469622f055c221f17b034338724007d261b0acad0472e574f196cc48eefbea516053b35c6d2d3b8753
6
+ metadata.gz: 0d65c96d9a68257bfbad1440c6bf1362539ad3965a42e50fa84d5cd6f296164c64df7d92d83a8f503d6cf7a87a93fbb58fed1dba0ecb942f9bc65a9b45541da0
7
+ data.tar.gz: e622ee50cf996ec2e828f49c537fbfd2cfea232aa3de9d711bce0f6c5dd6539c3beab5f3f4ce2c70ea49d7d7b620b701abedb88df225e52107a9ec11e892ccbb
data/Gemfile.lock CHANGED
@@ -8,25 +8,19 @@ PATH
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activesupport (4.0.2)
12
- i18n (~> 0.6, >= 0.6.4)
13
- minitest (~> 4.2)
14
- multi_json (~> 1.3)
15
- thread_safe (~> 0.1)
16
- tzinfo (~> 0.3.37)
17
- atomic (1.1.14)
18
- columnize (0.3.6)
19
- debugger (1.6.3)
20
- columnize (>= 0.3.1)
21
- debugger-linecache (~> 1.2.0)
22
- debugger-ruby_core_source (~> 1.2.4)
23
- debugger-linecache (1.2.0)
24
- debugger-ruby_core_source (1.2.4)
11
+ activesupport (4.2.1)
12
+ i18n (~> 0.7)
13
+ json (~> 1.7, >= 1.7.7)
14
+ minitest (~> 5.1)
15
+ thread_safe (~> 0.3, >= 0.3.4)
16
+ tzinfo (~> 1.1)
17
+ byebug (4.0.3)
18
+ columnize (= 0.9.0)
19
+ columnize (0.9.0)
25
20
  diff-lcs (1.2.5)
26
- i18n (0.6.9)
21
+ i18n (0.7.0)
27
22
  json (1.8.1)
28
- minitest (4.7.5)
29
- multi_json (1.8.2)
23
+ minitest (5.5.1)
30
24
  rdoc (3.12.2)
31
25
  json (~> 1.4)
32
26
  rspec (2.14.1)
@@ -38,16 +32,16 @@ GEM
38
32
  diff-lcs (>= 1.1.3, < 2.0)
39
33
  rspec-mocks (2.14.4)
40
34
  sys-proctable (0.9.3)
41
- thread_safe (0.1.3)
42
- atomic
43
- tzinfo (0.3.38)
35
+ thread_safe (0.3.5)
36
+ tzinfo (1.2.2)
37
+ thread_safe (~> 0.1)
44
38
 
45
39
  PLATFORMS
46
40
  ruby
47
41
 
48
42
  DEPENDENCIES
49
43
  bundler (~> 1.0)
50
- debugger
44
+ byebug
51
45
  memory_tracker!
52
46
  rdoc (~> 3.12)
53
47
  rspec (~> 2.14.0)
@@ -10,6 +10,12 @@ module MemoryTracker
10
10
  filename = opts.fetch(:filename, "#{Rails.root}/log/memtracker_gcstat.log")
11
11
 
12
12
  @logger = logger_class.constantize.new(filename)
13
+ if @logger.respond_to?(:formatter)
14
+ @logger.formatter = proc do |severity, datetime, progname, msg|
15
+ "#{msg}\n"
16
+ end
17
+ end
18
+
13
19
  @num_lines = 0
14
20
  end
15
21
 
@@ -8,6 +8,11 @@ module MemoryTracker
8
8
  filename = opts.fetch(:filename, "#{Rails.root}/log/memtracker_urls.log")
9
9
 
10
10
  @logger = logger_class.constantize.new(filename)
11
+ if @logger.respond_to?(:formatter)
12
+ @logger.formatter = proc do |severity, datetime, progname, msg|
13
+ "#{msg}\n"
14
+ end
15
+ end
11
16
  end
12
17
 
13
18
  def push(request)
@@ -1,3 +1,3 @@
1
1
  module MemoryTracker
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
@@ -52,7 +52,7 @@ Gem::Specification.new do |s|
52
52
 
53
53
  s.add_runtime_dependency(%q<sys-proctable>, [">= 0"])
54
54
  s.add_runtime_dependency(%q<activesupport>, [">= 0"])
55
- s.add_development_dependency(%q<debugger>, [">= 0"])
55
+ s.add_development_dependency(%q<byebug>, [">= 0"])
56
56
  s.add_development_dependency(%q<rspec>, ["~> 2.14.0"])
57
57
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
58
58
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
data/spec/spec_helper.rb CHANGED
@@ -3,6 +3,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
 
4
4
  require 'singleton'
5
5
 
6
+ require 'active_support'
6
7
  require 'active_support/core_ext'
7
8
  require 'rspec'
8
9
  require 'sys/proctable'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memory_tracker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philippe Le Rohellec
@@ -14,84 +14,84 @@ dependencies:
14
14
  name: sys-proctable
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: debugger
42
+ name: byebug
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 2.14.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 2.14.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rdoc
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.12'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.12'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '1.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.0'
97
97
  description: Collect and analyze memory usage data for each individual Rails action
@@ -115,26 +115,26 @@ files:
115
115
  - app/views/memory_tracker/dashboards/index.html.erb
116
116
  - config/routes.rb
117
117
  - lib/memory_tracker.rb
118
- - lib/memory_tracker/version.rb
119
118
  - lib/memory_tracker/engine.rb
120
119
  - lib/memory_tracker/env.rb
121
120
  - lib/memory_tracker/gc_stat.rb
122
121
  - lib/memory_tracker/memory_tracker.rb
123
122
  - lib/memory_tracker/middleware.rb
124
123
  - lib/memory_tracker/request.rb
124
+ - lib/memory_tracker/stores/base.rb
125
125
  - lib/memory_tracker/stores/gcstat_logfile_store.rb
126
126
  - lib/memory_tracker/stores/in_memory_store.rb
127
- - lib/memory_tracker/stores/url_logfile_store.rb
128
127
  - lib/memory_tracker/stores/loader.rb
129
- - lib/memory_tracker/stores/base.rb
128
+ - lib/memory_tracker/stores/url_logfile_store.rb
129
+ - lib/memory_tracker/version.rb
130
130
  - memory_tracker.gemspec
131
- - spec/spec_helper.rb
131
+ - spec/lib/memory_tracker_spec.rb
132
+ - spec/lib/request_spec.rb
132
133
  - spec/lib/stores/gcstat_logfile_store_spec.rb
133
134
  - spec/lib/stores/in_memory_store_spec.rb
134
135
  - spec/lib/stores/loader_spec.rb
135
136
  - spec/lib/stores/url_logfile_store_spec.rb
136
- - spec/lib/request_spec.rb
137
- - spec/lib/memory_tracker_spec.rb
137
+ - spec/spec_helper.rb
138
138
  homepage: http://github.com/plerohellec/memory_tracker
139
139
  licenses:
140
140
  - MIT
@@ -145,25 +145,25 @@ require_paths:
145
145
  - lib
146
146
  required_ruby_version: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - '>='
148
+ - - ">="
149
149
  - !ruby/object:Gem::Version
150
150
  version: '0'
151
151
  required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - '>='
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.0.3
158
+ rubygems_version: 2.2.2
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Rails memory allocations tracker
162
162
  test_files:
163
163
  - spec/spec_helper.rb
164
+ - spec/lib/request_spec.rb
164
165
  - spec/lib/stores/gcstat_logfile_store_spec.rb
165
166
  - spec/lib/stores/in_memory_store_spec.rb
166
167
  - spec/lib/stores/loader_spec.rb
167
168
  - spec/lib/stores/url_logfile_store_spec.rb
168
- - spec/lib/request_spec.rb
169
169
  - spec/lib/memory_tracker_spec.rb