garbageman 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzY1ZjFmY2IxYjJhMzc0ZTNjNzdjNmFlZjBiNWY4ZmU5YmZjYTBiYw==
4
+ Mzk3YTcxM2I0Mjk1Mjk4NjdmNjlmYzY1YzI2OTY4NzEwZGE1M2I4NA==
5
5
  data.tar.gz: !binary |-
6
- ODQ1ODFhNDEzYTM0MzFmMGI5NjI4YTFiNDZkYWI5MmRmNDU0MDY1OQ==
6
+ ZjgyMDMwOTg3N2QyYzNmYjBjNmRiNmVjY2M0NmZmMDAwYzI3ZDFjMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWQwOTFlMjhlOWY0NzA4Y2VhYWJiZTFmNDYwOTNmYzY0OWZiNDQ0NDAwZWFi
10
- YWIxZDNmOWMwYzk2YzU4ZjU4ZDEwNWI4NjljYTIxNGIyYTUyZjE5OGNmOGIx
11
- ODBjNDgwZjMyZTYyNjAyZWM4YTcxNTI2NWVmYjcwNGRmZDRjNTA=
9
+ MGI0OWUwOWMzZTdjYTVhMjZjYTEwMWUxODUyZmFhZWJmYzdhNjk0MzhhZTVl
10
+ YWI2YjdhODUxMjkxOWFkZjk2Nzk2OTVhMzQ4ZDk4NjdjNDllZGMxYTViYjQ2
11
+ MjE2ZjUyMGVhMjBiNThhYjkyN2Q5ZDBmZTEyYjljMGQ2YmM4NTI=
12
12
  data.tar.gz: !binary |-
13
- OTA4MGRhZTFmZmRmZGUxZjYxYzBhODQ5NjQxMGQ3ZmMxZmJiNjlkNGJlNWM5
14
- ODJjMWJkZTE2YjhmZjdjMWUwZDcwNWVhYWZhOTNkYjU0Y2UyMTk1NjkyNTJl
15
- MDk4ODA1ZTFkZjYzYjM0ZDZhZWMwMGE2ZDY3NTZiNTk0ZjEwODM=
13
+ NTQ2NjQ1MTNlNGFjOTgyZDYyMTBlYTQyMjk1ZTNkMzAyNDg1MmRiYmRjZWIx
14
+ MGFhMjE1ZTMyNzI3ZDFmYmI3N2FkY2MyYzAyMGIxMGFjZWJlNDM2ZTgzNDU4
15
+ MzlmM2YzMzYyNWIxYzFkYTkyY2QxZDRjNjI1MWE2ZjI5MmMxMDM=
data/garbageman.gemspec CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "garbageman"
9
- s.version = "0.2.8"
9
+ s.version = "0.2.9"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -93,7 +93,7 @@ module GarbageMan
93
93
  debug "starting gc"
94
94
  starts = Time.now
95
95
  GC.enable
96
- GC.start
96
+ Config.gc_starts.times { GC.start; sleep Config.gc_sleep }
97
97
  @last_gc_finished_at = Time.now
98
98
  diff = (@last_gc_finished_at - starts) * 1000
99
99
  info "GC took #{'%.2f' % diff}ms for #{@request_count} requests" if @show_gc_times
@@ -114,7 +114,7 @@ module GarbageMan
114
114
 
115
115
  def create_gc_yaml
116
116
  return unless server_index
117
- return if File.exists?(Config.gc_yaml_file)
117
+ return if File.exists?(Config.gc_yaml_file) && ! current_server?
118
118
  write_gc_yaml server_index, SELECTED
119
119
  end
120
120
 
@@ -56,5 +56,13 @@ module GarbageMan
56
56
  @@max_connection_drain_time = 60
57
57
  def self.max_connection_drain_time; @@max_connection_drain_time; end
58
58
  def self.max_connection_drain_time=(time); @@max_connection_drain_time = time; end
59
+
60
+ @@gc_starts = 20
61
+ def self.gc_starts; @@gc_starts; end
62
+ def self.gc_starts=(v); @@gc_starts = v; end
63
+
64
+ @@gc_sleep = 0.05
65
+ def self.gc_sleep; @@gc_sleep; end
66
+ def self.gc_sleep=(v); @@gc_sleep = v; end
59
67
  end
60
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: garbageman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doug Youch