dawanda-statsd-client 0.1.0 → 0.1.1
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/README.md +1 -1
- data/VERSION +1 -1
- data/bin/statsd-send +1 -1
- data/dawanda-statsd-client.gemspec +69 -0
- data/lib/{statsd-client.rb → statsd/client.rb} +2 -3
- metadata +5 -4
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/bin/statsd-send
CHANGED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{dawanda-statsd-client}
|
8
|
+
s.version = "0.1.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Tom Taylor"]
|
12
|
+
s.date = %q{2011-02-23}
|
13
|
+
s.default_executable = %q{statsd-send}
|
14
|
+
s.description = %q{A Ruby client for statsd}
|
15
|
+
s.email = %q{tom@tomtaylor.co.uk}
|
16
|
+
s.executables = ["statsd-send"]
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".document",
|
23
|
+
".rspec",
|
24
|
+
"Gemfile",
|
25
|
+
"Gemfile.lock",
|
26
|
+
"LICENSE.txt",
|
27
|
+
"README.md",
|
28
|
+
"Rakefile",
|
29
|
+
"VERSION",
|
30
|
+
"bin/statsd-send",
|
31
|
+
"dawanda-statsd-client.gemspec",
|
32
|
+
"lib/statsd/client.rb",
|
33
|
+
"spec/spec_helper.rb",
|
34
|
+
"spec/statsd-client_spec.rb",
|
35
|
+
"statsd-client.example.yml"
|
36
|
+
]
|
37
|
+
s.homepage = %q{http://github.com/dawanda/statsd-client}
|
38
|
+
s.licenses = ["MIT"]
|
39
|
+
s.require_paths = ["lib"]
|
40
|
+
s.rubygems_version = %q{1.3.7}
|
41
|
+
s.summary = %q{Client for statds}
|
42
|
+
s.test_files = [
|
43
|
+
"spec/spec_helper.rb",
|
44
|
+
"spec/statsd-client_spec.rb"
|
45
|
+
]
|
46
|
+
|
47
|
+
if s.respond_to? :specification_version then
|
48
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
49
|
+
s.specification_version = 3
|
50
|
+
|
51
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
52
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
|
53
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
54
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
|
55
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
56
|
+
else
|
57
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
58
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
59
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
60
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
61
|
+
end
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<rspec>, ["~> 2.3.0"])
|
64
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
65
|
+
s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
|
66
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
@@ -45,7 +45,7 @@ class Statsd
|
|
45
45
|
|
46
46
|
# statds reports with default configs 1/10 of actual value
|
47
47
|
def factor
|
48
|
-
config['factor'] ||
|
48
|
+
config['factor'] || 1
|
49
49
|
end
|
50
50
|
|
51
51
|
def deactivated?
|
@@ -63,7 +63,7 @@ class Statsd
|
|
63
63
|
|
64
64
|
|
65
65
|
class Client
|
66
|
-
VERSION = File.read( File.join(File.dirname(__FILE__),'..','VERSION') ).strip
|
66
|
+
VERSION = File.read( File.join(File.dirname(__FILE__),'..', '..', 'VERSION') ).strip
|
67
67
|
attr_reader :host, :port
|
68
68
|
|
69
69
|
# Initializes a Statsd client.
|
@@ -123,7 +123,6 @@ class Statsd
|
|
123
123
|
private
|
124
124
|
|
125
125
|
def send(data, sample_rate = 1)
|
126
|
-
puts "sending #{data}"
|
127
126
|
sampled_data = {}
|
128
127
|
|
129
128
|
if sample_rate < 1
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dawanda-statsd-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Taylor
|
@@ -99,7 +99,8 @@ files:
|
|
99
99
|
- Rakefile
|
100
100
|
- VERSION
|
101
101
|
- bin/statsd-send
|
102
|
-
-
|
102
|
+
- dawanda-statsd-client.gemspec
|
103
|
+
- lib/statsd/client.rb
|
103
104
|
- spec/spec_helper.rb
|
104
105
|
- spec/statsd-client_spec.rb
|
105
106
|
- statsd-client.example.yml
|