fluent-plugin-ruby-memory-usage-profiler 0.0.2 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4227f2f202044fe0d50cb4c2678a3f053f4d2bcf
|
4
|
+
data.tar.gz: 74ff024e7ae42554bfde8ffe943ec74f9a64edb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f415f72b0e48c3749135a4f66827257049c0d07b4ccb718563643186f7a8dd220f6d869788c71f538a07fac74952fa2a7fbdc334fb631a04db26bbce911aa178
|
7
|
+
data.tar.gz: 60c9bd07d2dfbdf91013a0ff386b2047425c40df3df85815a1e504f3fc8b29ddca3ca1a576743d89f2326c711f6b819f9aacfb0456c2cd92751738b504698158
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "fluent-plugin-ruby-memory-usage-profiler"
|
5
|
-
spec.version = "0.0.
|
5
|
+
spec.version = "0.0.3"
|
6
6
|
spec.authors = ["TAGOMORI Satoshi"]
|
7
7
|
spec.email = ["tagomoris@gmail.com"]
|
8
8
|
spec.description = %q{Collect memory usage profile information and emit it (or output on fluentd log)}
|
@@ -6,6 +6,8 @@ module Fluent
|
|
6
6
|
|
7
7
|
config_param :duration, :integer, :default => 1
|
8
8
|
config_param :name, :string, :default => 'fluentd_memory'
|
9
|
+
config_param :out_time, :bool, :default => true # for 'file' only
|
10
|
+
config_param :time_format, :string, :default => '%Y-%m-%d %H:%M:%S %z'
|
9
11
|
|
10
12
|
config_param :tag, :string, :default => 'memory_usage_profile'
|
11
13
|
config_param :loglevel, :string, :default => 'info'
|
@@ -32,8 +34,15 @@ module Fluent
|
|
32
34
|
@file = (@path == '-' ? STDOUT : open(@path, 'w+'))
|
33
35
|
raise Fluent::ConfigError, "failed to open file '#{@path}' to write" unless @file
|
34
36
|
@file.sync = true
|
35
|
-
|
36
|
-
|
37
|
+
if @out_time
|
38
|
+
@file.puts (['time'] + @banner).join("\t")
|
39
|
+
else
|
40
|
+
@file.puts @banner.join("\t")
|
41
|
+
end
|
42
|
+
@out = lambda do |result|
|
43
|
+
header = @out_time ? [Time.now.strftime(@time_format)] : []
|
44
|
+
@file.puts (header + result).join("\t")
|
45
|
+
end
|
37
46
|
else
|
38
47
|
raise Fluent::ConfigError, "invalid output_type '#{@output_type}'"
|
39
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-ruby-memory-usage-profiler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|