fluent-plugin-gc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/fluent-plugin-gc.gemspec +1 -1
- data/lib/fluent/plugin/in_gc.rb +8 -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: 705d9f1dfcd93cb19368ecffd3ce772c2be7ec32
|
4
|
+
data.tar.gz: 685b6ce19bb570890695391a5a6892930736e713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76a62ba40564ceb0b53a494413d0739580d3168e3508ffb78dc2689d68c1d7a3e117379184c69e2eb2bcce09ecb5ecba93a06b3a6cb0a16dc797780e3508e11a
|
7
|
+
data.tar.gz: 1d62758f4a9fc4ff326d7673a5aa1a4da61b7a55439193706a724fad4f098d760e1007952a5749e2ab1dd36a5c6476cee4f8240769154650920806f53f468801
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# fluent-plugin-gc [![Build Status](https://secure.travis-ci.org/sonots/fluent-plugin-gc.png?branch=master)](http://travis-ci.org/sonots/fluent-plugin-gc)
|
2
2
|
|
3
|
-
Fluentd plugin to disable GC and start GC at arbitrary interval
|
3
|
+
Fluentd plugin to disable GC and start GC at arbitrary interval. This plugin is for testing only.
|
4
4
|
|
5
5
|
## Configuration
|
6
6
|
|
data/fluent-plugin-gc.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "fluent-plugin-gc"
|
6
|
-
s.version = "0.0.
|
6
|
+
s.version = "0.0.2"
|
7
7
|
s.authors = ["Naotoshi Seo"]
|
8
8
|
s.email = ["sonots@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/sonots/fluent-plugin-gc"
|
data/lib/fluent/plugin/in_gc.rb
CHANGED
@@ -2,6 +2,11 @@
|
|
2
2
|
class Fluent::GcInput < Fluent::Input
|
3
3
|
Fluent::Plugin.register_input('gc', self)
|
4
4
|
|
5
|
+
# To support log_level option implemented by Fluentd v0.10.43
|
6
|
+
unless method_defined?(:log)
|
7
|
+
define_method("log") { $log }
|
8
|
+
end
|
9
|
+
|
5
10
|
config_param :disable, :bool, :default => false
|
6
11
|
config_param :interval, :time, :default => 5
|
7
12
|
config_param :debug, :bool, :default => false
|
@@ -37,16 +42,16 @@ class Fluent::GcInput < Fluent::Input
|
|
37
42
|
@last_checked = now
|
38
43
|
end
|
39
44
|
rescue => e
|
40
|
-
|
45
|
+
log.warn "#{e.class} #{e.message} #{e.backtrace.first}"
|
41
46
|
end
|
42
47
|
end
|
43
48
|
end
|
44
49
|
|
45
50
|
def start_gc
|
46
|
-
|
51
|
+
log.info "gc: before #{GC.stat}" if @debug # intentionally info level
|
47
52
|
disabled = GC.enable
|
48
53
|
GC.start
|
49
54
|
GC.disable if disabled
|
50
|
-
|
55
|
+
log.info "gc: after #{GC.stat}" if @debug
|
51
56
|
end
|
52
57
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-gc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|