fluent-plugin-watch-objectspace 0.2.1 → 0.2.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
  SHA256:
3
- metadata.gz: 19ba7128bca625929870b7a571421b0684285005536709de94f7a36abcbbc9b7
4
- data.tar.gz: d7f0d3eeb7e1869ef62b956fab42c9b798fcf4c097d146b944b75cec2033f895
3
+ metadata.gz: 65214f7fd687114cca772945e6cbb98f455c61a3cdb87002f95e36f0b7382dfc
4
+ data.tar.gz: a4bf9fbbd8b464b1342b272257f08acba00ec1d1385e410ea96487c243a1ed57
5
5
  SHA512:
6
- metadata.gz: 450b9e0e801529c7f1b975714878a34ef04aaa4bcf68ce086ad1d8d141a3dfdee0c52956cd21686d189f49611947fbc196cb578bef37a75113571e7b064a429a
7
- data.tar.gz: c06ca2aaa35dcc317eeb9472a550b3f8dd315fd1fa03aa01629b856f690c8ee9accc26d94f8e67ebe6e68cd980ac81f726e6d5f127ec8987dbf6210b262afe44
6
+ metadata.gz: 6f2088e72264992564a36a3d9c817e9bd774bd468aab7b79308579dcb21b768733de3ee720e6d2767ee9ab3860106febf1844be02067158d18340e0b46a87790
7
+ data.tar.gz: 7d43e55cacf558936256dbfae79154e4fd6f5aa02bd99d70f80c16f875958b13c11c87370d4eeea3e0f0e6ce46d63743cf3cb852f99e576007047b39551a9237
data/README.md CHANGED
@@ -74,6 +74,10 @@ If memory usage is over 1.3 times, it raise an exception.
74
74
  fluent-plugin-watch-process is useful cron/batch process monitoring, In contrast to it, fluent-plugin-watch-objectspace is
75
75
  focused on used plugin's resource usage especially object and memory.
76
76
 
77
+ ### Why is alpine not supported?
78
+
79
+ Because alpine adopts Busybox by default, top -p or alternative ps -q is not supported.
80
+
77
81
  ## Copyright
78
82
 
79
83
  * Copyright(c) 2021- Kentaro Hayashi
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = "fluent-plugin-watch-objectspace"
6
- spec.version = "0.2.1"
6
+ spec.version = "0.2.2"
7
7
  spec.authors = ["Kentaro Hayashi"]
8
8
  spec.email = ["kenhys@gmail.com"]
9
9
 
@@ -57,6 +57,11 @@ module Fluent
57
57
  end
58
58
  end
59
59
  end
60
+ if File.readlines("/etc/os-release").any? { |line| line.include?("ID=alpine\n") }
61
+ # alpine's top doesn't support -p option because it uses Busybox
62
+ # ps -q is also not supported. No better way to support it by default.
63
+ raise RuntimeError, "BUG: alpine is not supported"
64
+ end
60
65
  @warmup_time = Time.now + @watch_delay
61
66
  @source = {}
62
67
  GC::Profiler.enable
@@ -205,6 +205,14 @@ class WatchObjectspaceInputTest < Test::Unit::TestCase
205
205
  assert_equal(1.5, d.instance.threshold.res_of_top)
206
206
  end
207
207
  end
208
+
209
+ def test_block_alpine
210
+ stub(File).readlines { ["ID=alpine\n"] }
211
+ config = create_config
212
+ assert_raise RuntimeError.new("BUG: alpine is not supported") do
213
+ d = create_driver(config)
214
+ end
215
+ end
208
216
  end
209
217
 
210
218
  sub_test_case "parser" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-watch-objectspace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kentaro Hayashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-30 00:00:00.000000000 Z
11
+ date: 2021-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler