metriksd 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/lib/metriksd.rb CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Metriksd
3
- VERSION = '0.5.3'
3
+ VERSION = '0.5.4'
4
4
  end
5
5
 
6
6
  require 'metriksd/cli'
@@ -82,8 +82,10 @@ module Metriksd
82
82
  add_meter(data)
83
83
  when 'histogram'
84
84
  add_histogram(data)
85
+ when 'gauge'
86
+ add_gauge(data)
85
87
  else
86
- raise "Unknown data type: #{data[:type].inspect}"
88
+ puts "Unknown data type: #{data[:type].inspect}"
87
89
  end
88
90
  end
89
91
  end
@@ -97,7 +99,11 @@ module Metriksd
97
99
  end
98
100
 
99
101
  def add_counter(data)
100
- counter(data.name, data[:source], data[:count])
102
+ average_gauge(data.name, data[:source], data[:count])
103
+ end
104
+
105
+ def add_gauge(data)
106
+ average_gauge(data.name, data[:source], data[:value])
101
107
  end
102
108
 
103
109
  def add_timer(data)
data/metriksd.gemspec CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
13
13
  ## If your rubyforge_project name is different, then edit it and comment out
14
14
  ## the sub! line in the Rakefile
15
15
  s.name = 'metriksd'
16
- s.version = '0.5.3'
17
- s.date = '2013-01-27'
16
+ s.version = '0.5.4'
17
+ s.date = '2013-09-26'
18
18
 
19
19
  ## Make sure your summary is short. The description may be as long
20
20
  ## as you like.
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 3
9
- version: 0.5.3
8
+ - 4
9
+ version: 0.5.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Lindvall
@@ -14,12 +14,13 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-01-27 00:00:00 -08:00
17
+ date: 2013-09-26 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- type: :runtime
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
21
+ name: librato-metrics
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
23
24
  requirements:
24
25
  - - ">="
25
26
  - !ruby/object:Gem::Version
@@ -33,12 +34,12 @@ dependencies:
33
34
  - 2
34
35
  - 0
35
36
  version: "2.0"
36
- name: librato-metrics
37
- requirement: *id001
38
- prerelease: false
39
- - !ruby/object:Gem::Dependency
40
37
  type: :runtime
41
- version_requirements: &id002 !ruby/object:Gem::Requirement
38
+ version_requirements: *id001
39
+ - !ruby/object:Gem::Dependency
40
+ name: msgpack
41
+ prerelease: false
42
+ requirement: &id002 !ruby/object:Gem::Requirement
42
43
  requirements:
43
44
  - - ~>
44
45
  - !ruby/object:Gem::Version
@@ -46,36 +47,36 @@ dependencies:
46
47
  - 0
47
48
  - 4
48
49
  version: "0.4"
49
- name: msgpack
50
- requirement: *id002
51
- prerelease: false
52
- - !ruby/object:Gem::Dependency
53
50
  type: :runtime
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: snappy
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
55
56
  requirements:
56
57
  - - ">="
57
58
  - !ruby/object:Gem::Version
58
59
  segments:
59
60
  - 0
60
61
  version: "0"
61
- name: snappy
62
- requirement: *id003
63
- prerelease: false
64
- - !ruby/object:Gem::Dependency
65
62
  type: :runtime
66
- version_requirements: &id004 !ruby/object:Gem::Requirement
63
+ version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
65
+ name: activesupport
66
+ prerelease: false
67
+ requirement: &id004 !ruby/object:Gem::Requirement
67
68
  requirements:
68
69
  - - ">="
69
70
  - !ruby/object:Gem::Version
70
71
  segments:
71
72
  - 0
72
73
  version: "0"
73
- name: activesupport
74
- requirement: *id004
75
- prerelease: false
76
- - !ruby/object:Gem::Dependency
77
74
  type: :runtime
78
- version_requirements: &id005 !ruby/object:Gem::Requirement
75
+ version_requirements: *id004
76
+ - !ruby/object:Gem::Dependency
77
+ name: eventmachine
78
+ prerelease: false
79
+ requirement: &id005 !ruby/object:Gem::Requirement
79
80
  requirements:
80
81
  - - ~>
81
82
  - !ruby/object:Gem::Version
@@ -83,21 +84,20 @@ dependencies:
83
84
  - 1
84
85
  - 0
85
86
  version: "1.0"
86
- name: eventmachine
87
- requirement: *id005
88
- prerelease: false
87
+ type: :runtime
88
+ version_requirements: *id005
89
89
  - !ruby/object:Gem::Dependency
90
- type: :development
91
- version_requirements: &id006 !ruby/object:Gem::Requirement
90
+ name: metriksd_reporter
91
+ prerelease: false
92
+ requirement: &id006 !ruby/object:Gem::Requirement
92
93
  requirements:
93
94
  - - ">="
94
95
  - !ruby/object:Gem::Version
95
96
  segments:
96
97
  - 0
97
98
  version: "0"
98
- name: metriksd_reporter
99
- requirement: *id006
100
- prerelease: false
99
+ type: :development
100
+ version_requirements: *id006
101
101
  description: ""
102
102
  email: eric@sevenscale.com
103
103
  executables: