statsd-client 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/statsd.rb +2 -2
  2. data/test/statsd_test.rb +4 -4
  3. metadata +2 -8
@@ -3,7 +3,7 @@ require 'resolv'
3
3
 
4
4
  class Statsd
5
5
 
6
- Version = '0.0.7'
6
+ Version = '0.0.8'
7
7
 
8
8
  class << self
9
9
 
@@ -59,7 +59,7 @@ class Statsd
59
59
  if sample_rate < 1
60
60
  data.each do |d|
61
61
  if rand <= sample_rate
62
- sampled_data << "#{d}@#{sample_rate}"
62
+ sampled_data << "#{d}|@#{sample_rate}"
63
63
  end
64
64
  end
65
65
  data = sampled_data
@@ -17,7 +17,7 @@ class StatsdTest < Test::Unit::TestCase
17
17
 
18
18
  should "log when sampled" do
19
19
  fake_rand(0.09)
20
- expected_send('test.stat:23|ms@0.1')
20
+ expected_send('test.stat:23|ms|@0.1')
21
21
  Statsd.timing('test.stat', 23, 0.1)
22
22
  end
23
23
 
@@ -45,7 +45,7 @@ class StatsdTest < Test::Unit::TestCase
45
45
 
46
46
  should "log when sampled" do
47
47
  fake_rand(0.09)
48
- expected_send('test.stat:1|c@0.1')
48
+ expected_send('test.stat:1|c|@0.1')
49
49
  Statsd.increment('test.stat', 0.1)
50
50
  end
51
51
 
@@ -66,7 +66,7 @@ class StatsdTest < Test::Unit::TestCase
66
66
 
67
67
  should "log when sampled" do
68
68
  fake_rand(0.09)
69
- expected_send('test.stat:-1|c@0.1')
69
+ expected_send('test.stat:-1|c|@0.1')
70
70
  Statsd.decrement('test.stat', 0.1)
71
71
  end
72
72
 
@@ -87,7 +87,7 @@ class StatsdTest < Test::Unit::TestCase
87
87
 
88
88
  should "log when sampled" do
89
89
  fake_rand(0.09)
90
- expected_send('test.stat:1337|g@0.1')
90
+ expected_send('test.stat:1337|g|@0.1')
91
91
  Statsd.gauge('test.stat', 1337, 0.1)
92
92
  end
93
93
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsd-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-11 00:00:00.000000000 Z
12
+ date: 2012-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda-context
@@ -70,18 +70,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  - - ! '>='
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0'
73
- segments:
74
- - 0
75
- hash: -1611389077087709382
76
73
  required_rubygems_version: !ruby/object:Gem::Requirement
77
74
  none: false
78
75
  requirements:
79
76
  - - ! '>='
80
77
  - !ruby/object:Gem::Version
81
78
  version: '0'
82
- segments:
83
- - 0
84
- hash: -1611389077087709382
85
79
  requirements: []
86
80
  rubyforge_project:
87
81
  rubygems_version: 1.8.21