fluent-plugin-ruby-memory-usage-profiler 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd957ccd5cd04ed3d01a05c18f7b07f0d08069ce
|
4
|
+
data.tar.gz: 1a69549a1db62e10831db7cf77ef1580071699e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18b343934c4bdaf5d4079a2e52a779972098b53d7c0fefa0d06ae68a04aa2752036eb23e91a3a008512b0820b2bd4f3476ddd388c7152dbbf81e9191d232ebb9
|
7
|
+
data.tar.gz: 48a45b8adaf7f35afb5d7a9fe6bf1746a07ab38ee9f0494248689f42dd98acbd5617de1b2b02a3608d0531c433498b4fa7d5212294a2c44fdb2d4efc247eafb1
|
data/example/log.conf
CHANGED
@@ -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.2"
|
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)}
|
@@ -44,11 +44,17 @@ module Fluent
|
|
44
44
|
@running = true
|
45
45
|
@thread = Thread.new do
|
46
46
|
begin
|
47
|
-
|
47
|
+
count = 0
|
48
|
+
while sleep(1)
|
49
|
+
break unless @running
|
50
|
+
|
51
|
+
count += 1
|
52
|
+
next if count < @duration
|
53
|
+
|
48
54
|
MemoryUsageProfiler.kick(@name) {|result|
|
49
55
|
@out.call(result)
|
50
56
|
}
|
51
|
-
|
57
|
+
count = 0
|
52
58
|
end
|
53
59
|
rescue => e
|
54
60
|
$log.error "Unexpected error in ruby_memory_usage_profiler", :error_class => e.class, :error => e
|
@@ -58,6 +64,7 @@ module Fluent
|
|
58
64
|
|
59
65
|
def stop
|
60
66
|
@running = false
|
67
|
+
@thread.join
|
61
68
|
end
|
62
69
|
end
|
63
70
|
end
|