vitals 0.9.1 → 0.10.0

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: 738850e6aea3707c46d19fe0390ef3082c704ba1
4
- data.tar.gz: dcab4b0f0b5a007b00d6eefa352b7398d53a1fd0
3
+ metadata.gz: ab55c272d50d7ca216629ddd5ba0a49235f29e1e
4
+ data.tar.gz: f3f0d35aaf47f42951e04644f8aba94aa4d59512
5
5
  SHA512:
6
- metadata.gz: 4b6d52e96be30b6bfac5d73093b2698dff5861dca1f8a992519d7ad48f536081ef4e73cfe940cc3aec74d924391f1ef9c174725e5e8d7e704437f59810276d53
7
- data.tar.gz: cbe7f48dae299731e3fd790abfeda110940d9a84f9944fcefb59a51809bcff9299c5945d802ab4d67134921b3e0f7a64b48214324e1d58391c595a15c1cdda40
6
+ metadata.gz: 8036411ce34c3b35b696d9ad604a93c7ffce42361906051db38f4aee99f1430ed03bf9d9f182b8d090b731d3025e06d0d7e92fa7dd4784f10fc2abc68c849432
7
+ data.tar.gz: c17f2810d26cb435de5bc4b32ec085245c95550a25cb9bc61ef8c625129fd720664df4bfa0d01dbe6acc9ba10d9991621c133d8c60d82ce08ebd125f13b50ae7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- vitals (0.9.1)
4
+ vitals (0.10.0)
5
5
  statsd-ruby (~> 1.3.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -97,6 +97,8 @@ You can emit metrics from anywhere:
97
97
  ```ruby
98
98
  Vitals.inc('my_metric')
99
99
 
100
+ Vitals.count('my_metric', 17)
101
+
100
102
  Vitals.gauge('my_metric', 42)
101
103
 
102
104
  Vitals.timing('my_metric', 500) # milliseconds
@@ -16,6 +16,10 @@ module Vitals::Reporters
16
16
  print "#{@category} GAUGE #{self.format.format(m)} #{v}"
17
17
  end
18
18
 
19
+ def count(m, v)
20
+ print "#{@category} COUNT #{self.format.format(m)} #{v}"
21
+ end
22
+
19
23
  def timing(m, v)
20
24
  print "#{@category} TIME #{self.format.format(m)} #{v}"
21
25
  end
@@ -15,6 +15,10 @@ module Vitals::Reporters
15
15
  @reporters.each{|r| r.gauge(m, v) }
16
16
  end
17
17
 
18
+ def count(m, v)
19
+ @reporters.each{|r| r.count(m, v) }
20
+ end
21
+
18
22
  def timing(m, v)
19
23
  @reporters.each{|r| r.timing(m, v) }
20
24
  end
@@ -18,10 +18,12 @@ module Vitals::Reporters
18
18
  @statsd.gauge(format.format(m), v)
19
19
  end
20
20
 
21
+ def count(m, v)
22
+ @statsd.count(format.format(m), v)
23
+ end
24
+
21
25
  def timing(m, v)
22
26
  @statsd.timing(format.format(m), v)
23
27
  end
24
28
  end
25
29
  end
26
-
27
-
@@ -1,3 +1,3 @@
1
1
  module Vitals
2
- VERSION = "0.9.1"
2
+ VERSION = "0.10.0"
3
3
  end
data/lib/vitals.rb CHANGED
@@ -59,6 +59,10 @@ module Vitals
59
59
  reporter.timing(m, val)
60
60
  end
61
61
 
62
+ def self.count(m, val)
63
+ reporter.count(m, val)
64
+ end
65
+
62
66
  def self.gauge(m, val)
63
67
  reporter.gauge(m, val)
64
68
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vitals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dotan Nahum
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-26 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: statsd-ruby