tcptop 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/tcptop/collectd.rb +2 -2
- data/lib/tcptop/version.rb +1 -1
- data/test/collectd_test.rb +2 -2
- metadata +3 -3
data/lib/tcptop/collectd.rb
CHANGED
@@ -2,8 +2,8 @@ module Tcptop
|
|
2
2
|
class Collectd
|
3
3
|
def self.reading(active, queued, hostname, label, io=STDOUT)
|
4
4
|
time = Time.now.to_i
|
5
|
-
io.write "PUTVAL #{hostname}/#{label}/
|
6
|
-
io.write "PUTVAL #{hostname}/#{label}/
|
5
|
+
io.write "PUTVAL #{hostname}/#{label}/gauge-active #{time}:#{active}\n"
|
6
|
+
io.write "PUTVAL #{hostname}/#{label}/gauge-queued #{time}:#{queued}\n"
|
7
7
|
io.flush
|
8
8
|
end
|
9
9
|
end
|
data/lib/tcptop/version.rb
CHANGED
data/test/collectd_test.rb
CHANGED
@@ -7,7 +7,7 @@ class CollectdTest < Test::Unit::TestCase
|
|
7
7
|
|
8
8
|
lines = s.split("\n")
|
9
9
|
assert_equal 2, lines.size
|
10
|
-
assert_match %r{PUTVAL localhost/unicorn/
|
11
|
-
assert_match %r{PUTVAL localhost/unicorn/
|
10
|
+
assert_match %r{PUTVAL localhost/unicorn/gauge-active \d+:10}, lines.first
|
11
|
+
assert_match %r{PUTVAL localhost/unicorn/gauge-queued \d+:2}, lines.last
|
12
12
|
end
|
13
13
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tcptop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tony Pitluga
|