metriksd 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,4 +4,4 @@ gemspec
4
4
 
5
5
  gem 'rake', '0.8.7'
6
6
 
7
- gem 'metriksd_reporter', :path => '../metriksd_reporter'
7
+ #gem 'metriksd_reporter', :path => '../metriksd_reporter'
@@ -80,6 +80,8 @@ module Metriksd
80
80
  add_utilization_timer(data)
81
81
  when 'meter'
82
82
  add_meter(data)
83
+ when 'histogram'
84
+ add_histogram(data)
83
85
  else
84
86
  raise "Unknown data type: #{data[:type].inspect}"
85
87
  end
@@ -99,7 +101,8 @@ module Metriksd
99
101
  end
100
102
 
101
103
  def add_timer(data)
102
- average_gauge(data.name + '.mean', data[:source], data[:mean])
104
+ # average_gauge(data.name + '.mean', data[:source], data[:mean])
105
+
103
106
  sum_gauge(data.name + '.one_minute_rate', data[:source], data[:one_minute_rate])
104
107
 
105
108
  if data[:median]
@@ -112,7 +115,8 @@ module Metriksd
112
115
  end
113
116
 
114
117
  def add_utilization_timer(data)
115
- average_gauge(data.name + '.mean', data[:source], data[:mean])
118
+ # average_gauge(data.name + '.mean', data[:source], data[:mean])
119
+
116
120
  sum_gauge(data.name + '.one_minute_rate', data[:source], data[:one_minute_rate])
117
121
  average_gauge(data.name + '.one_minute_utilization', data[:source], data[:one_minute_utilization])
118
122
 
@@ -129,6 +133,18 @@ module Metriksd
129
133
  sum_gauge(data.name, data[:source], data[:one_minute_rate])
130
134
  end
131
135
 
136
+ def add_histogram(data)
137
+ # average_gauge(data.name + '.mean', data[:source], data[:mean])
138
+
139
+ if data[:median]
140
+ average_gauge(data.name + '.median', data[:source], data[:median])
141
+ end
142
+
143
+ if data["95th_percentile"]
144
+ average_gauge(data.name + '.95th_percentile', data[:source], data["95th_percentile"])
145
+ end
146
+ end
147
+
132
148
  def average_gauge(name, source, value)
133
149
  key = [ name, source ].join('/')
134
150
  @gauges[key] ||= AverageGauge.new(name, source)
data/lib/metriksd.rb CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Metriksd
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
 
6
6
  require 'metriksd/cli'
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.0'
17
- s.date = '2012-07-29'
16
+ s.version = '0.5.1'
17
+ s.date = '2012-10-02'
18
18
 
19
19
  ## Make sure your summary is short. The description may be as long
20
20
  ## as you like.
@@ -36,7 +36,8 @@ class MetriksdReporterTest < Test::Unit::TestCase
36
36
  :registry => @client_registry, :extras => { :source => Socket.gethostname })
37
37
 
38
38
  @client_reporter.start
39
- @client_registry.timer('client.test.metric').update(5.3)
39
+ @client_registry.timer('test.timer').update(5.3)
40
+ @client_registry.histogram('test.histogram').update(5.3)
40
41
 
41
42
  @client_reporter.flush
42
43
  @client_reporter.stop
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 0
9
- version: 0.5.0
8
+ - 1
9
+ version: 0.5.1
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: 2012-07-29 00:00:00 -07:00
17
+ date: 2012-10-02 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
@@ -27,12 +28,12 @@ dependencies:
27
28
  - 0
28
29
  - 7
29
30
  version: "0.7"
30
- name: librato-metrics
31
- requirement: *id001
32
- prerelease: false
33
- - !ruby/object:Gem::Dependency
34
31
  type: :runtime
35
- version_requirements: &id002 !ruby/object:Gem::Requirement
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: msgpack
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
36
37
  requirements:
37
38
  - - ~>
38
39
  - !ruby/object:Gem::Version
@@ -40,36 +41,36 @@ dependencies:
40
41
  - 0
41
42
  - 4
42
43
  version: "0.4"
43
- name: msgpack
44
- requirement: *id002
45
- prerelease: false
46
- - !ruby/object:Gem::Dependency
47
44
  type: :runtime
48
- version_requirements: &id003 !ruby/object:Gem::Requirement
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
47
+ name: snappy
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
49
50
  requirements:
50
51
  - - ">="
51
52
  - !ruby/object:Gem::Version
52
53
  segments:
53
54
  - 0
54
55
  version: "0"
55
- name: snappy
56
- requirement: *id003
57
- prerelease: false
58
- - !ruby/object:Gem::Dependency
59
56
  type: :runtime
60
- version_requirements: &id004 !ruby/object:Gem::Requirement
57
+ version_requirements: *id003
58
+ - !ruby/object:Gem::Dependency
59
+ name: activesupport
60
+ prerelease: false
61
+ requirement: &id004 !ruby/object:Gem::Requirement
61
62
  requirements:
62
63
  - - ">="
63
64
  - !ruby/object:Gem::Version
64
65
  segments:
65
66
  - 0
66
67
  version: "0"
67
- name: activesupport
68
- requirement: *id004
69
- prerelease: false
70
- - !ruby/object:Gem::Dependency
71
68
  type: :runtime
72
- version_requirements: &id005 !ruby/object:Gem::Requirement
69
+ version_requirements: *id004
70
+ - !ruby/object:Gem::Dependency
71
+ name: eventmachine
72
+ prerelease: false
73
+ requirement: &id005 !ruby/object:Gem::Requirement
73
74
  requirements:
74
75
  - - ~>
75
76
  - !ruby/object:Gem::Version
@@ -80,21 +81,20 @@ dependencies:
80
81
  - rc
81
82
  - 4
82
83
  version: 1.0.0.rc.4
83
- name: eventmachine
84
- requirement: *id005
85
- prerelease: false
84
+ type: :runtime
85
+ version_requirements: *id005
86
86
  - !ruby/object:Gem::Dependency
87
- type: :development
88
- version_requirements: &id006 !ruby/object:Gem::Requirement
87
+ name: metriksd_reporter
88
+ prerelease: false
89
+ requirement: &id006 !ruby/object:Gem::Requirement
89
90
  requirements:
90
91
  - - ">="
91
92
  - !ruby/object:Gem::Version
92
93
  segments:
93
94
  - 0
94
95
  version: "0"
95
- name: metriksd_reporter
96
- requirement: *id006
97
- prerelease: false
96
+ type: :development
97
+ version_requirements: *id006
98
98
  description: ""
99
99
  email: eric@sevenscale.com
100
100
  executables: