hosted_graphite 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hosted_graphite/statsd.rb +9 -9
- data/lib/hosted_graphite/version.rb +1 -1
- data/lib/hosted_graphite.rb +14 -12
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c18a0daa07195018fdab806abc4124719af90a3
|
4
|
+
data.tar.gz: 0fbb3f5396d3b8465a7dfe74002b74a1ebe62a90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eb9b126e6f4b158c83482527f3ea7bdea43d1b6eb698ec26c8ec061ec324a7bbd0ecf9a542e8e5f1729cdef88c214dd524dfc30dad9f0237a68f4a4ab507f0d
|
7
|
+
data.tar.gz: 186fa9363f0f4fd57e4415c881d3a2aea8cc097ac3ca25799e2f0194c237b1051a959c089a8ea17562c32370e3e081da18abf5371a226d6a64f09eaef372ca1e
|
@@ -28,31 +28,31 @@ module HostedGraphite
|
|
28
28
|
|
29
29
|
class << self
|
30
30
|
def increment(stat, sample_rate=1)
|
31
|
-
@@statsd.
|
31
|
+
@@statsd.increment stat, sample_rate
|
32
32
|
end
|
33
33
|
|
34
34
|
def decrement(stat, sample_rate=1)
|
35
|
-
@@statsd.
|
35
|
+
@@statsd.decrement stat, sample_rate
|
36
36
|
end
|
37
37
|
|
38
38
|
def count(stat, count, sample_rate=1)
|
39
|
-
@@statsd.
|
39
|
+
@@statsd.count stat, count, sample_rate
|
40
40
|
end
|
41
41
|
|
42
42
|
def gauge(stat, value, sample_rate=1)
|
43
|
-
@@statsd.
|
43
|
+
@@statsd.gauge stat, value, sample_rate
|
44
44
|
end
|
45
45
|
|
46
46
|
def set(stat, value, sample_rate=1)
|
47
|
-
@@statsd.
|
47
|
+
@@statsd.set stat, value, sample_rate
|
48
48
|
end
|
49
49
|
|
50
50
|
def timing(stat, ms, sample_rate=1)
|
51
|
-
@@statsd.
|
51
|
+
@@statsd.timing stat, ms, sample_rate
|
52
52
|
end
|
53
53
|
|
54
|
-
def time(stat, sample_rate=1)
|
55
|
-
@@statsd.time
|
54
|
+
def time(stat, sample_rate=1, &blk)
|
55
|
+
@@statsd.time stat, sample_rate, &blk
|
56
56
|
end
|
57
57
|
end
|
58
|
-
end
|
58
|
+
end
|
data/lib/hosted_graphite.rb
CHANGED
@@ -18,20 +18,22 @@ module HostedGraphite
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
class << self
|
22
|
+
def api_key
|
23
|
+
@@api_key
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
def api_key=(key)
|
27
|
+
@@api_key = key
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
def protocol
|
31
|
+
@@protocol
|
32
|
+
end
|
32
33
|
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
def protocol=(protocol)
|
35
|
+
# TODO, accept symbols and string (:udp, 'tcp')
|
36
|
+
@@protocol = protocol.new
|
37
|
+
end
|
36
38
|
end
|
37
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hosted_graphite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Abdelkader Boudih
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.2.2
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: A Ruby client for HostedGraphite
|