tunemygc 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tunemygc/snapshotter.rb +1 -1
- data/lib/tunemygc/version.rb +1 -1
- data/test/test_snapshotter.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c057ffb98292fe308fdbb32de479b706385a90cb
|
4
|
+
data.tar.gz: 31966bc7b7a03be74202a7e53d500d328aeceb0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a34abf695d7403acb0608953897816438b9e54985928f1711e05ca887ebdb27c7936e8d060dd70418eff0fa53ccebfb8fcdf83fa1ad712f6965f835cf1a7b26c
|
7
|
+
data.tar.gz: b68ddd00fd18ad710280d1d062d8f59265d528ae49a2a477818de839b759ae50270ebbd6102cd92cc3dd2044c20f77efbe5813a9be36bd45dd001d61e1ff1bbf
|
data/lib/tunemygc/snapshotter.rb
CHANGED
@@ -5,7 +5,7 @@ require 'thread'
|
|
5
5
|
module TuneMyGc
|
6
6
|
class Snapshotter
|
7
7
|
UNITS_OF_WORK = /REQUEST_PROCESSING_STARTED|REQUEST_PROCESSING_ENDED/
|
8
|
-
MAX_SAMPLES =
|
8
|
+
MAX_SAMPLES = (ENV['RUBY_GC_MAX_SAMPLES'] ? Integer(ENV['RUBY_GC_MAX_SAMPLES']) : 2000)
|
9
9
|
|
10
10
|
attr_reader :buffer
|
11
11
|
attr_accessor :unit_of_work
|
data/lib/tunemygc/version.rb
CHANGED
data/test/test_snapshotter.rb
CHANGED
@@ -25,17 +25,17 @@ class TestSnapshotter < TuneMyGcTestCase
|
|
25
25
|
|
26
26
|
def test_max_samples
|
27
27
|
snapshots = TuneMyGc::Snapshotter.new
|
28
|
-
|
28
|
+
2000.times do |i|
|
29
29
|
snapshots.take(:MAX)
|
30
30
|
end
|
31
|
-
assert_equal
|
31
|
+
assert_equal 2000, snapshots.size
|
32
32
|
out, err = capture_io do
|
33
33
|
TuneMyGc.logger = Logger.new($stdout)
|
34
34
|
snapshots.take(:MORE)
|
35
35
|
snapshots.take(:ANOTHER)
|
36
36
|
end
|
37
37
|
assert_match(/Discarding snapshot/, out)
|
38
|
-
assert_equal
|
38
|
+
assert_equal 2000, snapshots.size
|
39
39
|
snapshots.clear
|
40
40
|
end
|
41
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tunemygc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bear Metal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|