metricize 0.5.1 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 50fc0c83fce168261f1ef1ecb57e45a1b479584b
4
- data.tar.gz: 99ab9d17c1453a90a7653acefe1da2eec6b958cc
3
+ metadata.gz: 93e3b5462b8af108a21490ed34afb2510d5840c1
4
+ data.tar.gz: 05899e0480b5ed30692ae5082c742d6e785df5f6
5
5
  SHA512:
6
- metadata.gz: 2c8b2bdfc77e0b6448707173c7b6f5f4d434441cae636a62aab45f1ff367beedb60e4c5f06bb9beb550f0e79402c0ca2205e96a19fef5d74f8247bba7a4adcd3
7
- data.tar.gz: 56be1f2d4cfce176300a8d0dd0d7f45cb63ad52c2efa8517358d43e9f002997f1a042d0006151c87e309d74ef9a005e83531500c27b452c5bb48f52064ba5478
6
+ metadata.gz: 00772e25703b0a621721d275190c070b38c9e3db0cdcf08bbd11868fdca77f79f5dee5f9737a841772541e56305039d83e4414b4da4a777d932e27238301235f
7
+ data.tar.gz: 480e3ba029936eebaee79d7530b1c9733cb31eff1cf7fef2ae7b9b3cce1ee9704c7516586470894ee8be7598bb0d6909bd516f25b2093ee6e95d9792b233cade
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'autospec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rspec-core', 'autospec')
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rspec' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rspec-core', 'rspec')
@@ -89,10 +89,7 @@ module Metricize
89
89
  with_error_handling do
90
90
  print_histogram(key, values)
91
91
  end
92
- gauges << add_stat_by_key(key, values.size, '.count').merge(counter_attributes)
93
- gauges << add_stat_by_key(key, values.max, ".max")
94
- gauges << add_stat_by_key(key, values.min, ".min")
95
- [0.25, 0.50, 0.75, 0.95].each do |p|
92
+ [0.50, 0.95].each do |p|
96
93
  percentile = values.extend(Stats).calculate_percentile(p)
97
94
  gauges << add_stat_by_key(key, percentile, ".#{(p*100).to_i}e")
98
95
  end
@@ -1,3 +1,3 @@
1
1
  module Metricize
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -165,26 +165,6 @@ describe Metricize do
165
165
  forwarder.go!
166
166
  end
167
167
 
168
- it "asks for server aggregation on the count of value stats" do
169
- client.measure('value_stat1', 7)
170
- RestClient.should_receive(:post).with do | url, post_data |
171
- gauges = JSON.parse(post_data)['gauges']
172
- expect(gauges).to include("name"=>"prefix.value_stat1.count", "value"=>1, "attributes"=>{"source_aggregate"=>true, "summarize_function"=>"sum"})
173
- end
174
- forwarder.go!
175
- end
176
-
177
- it "adds min, max, and count" do
178
- [4,5,6].each { |value| client.measure('value1', value) }
179
- RestClient.should_receive(:post).with do | url, post_data |
180
- gauges = JSON.parse(post_data)['gauges']
181
- expect(gauges).to include("name"=>"prefix.value1.count", "value"=>3, "attributes"=>{"source_aggregate"=>true, "summarize_function"=>"sum"})
182
- expect(gauges).to include("name"=>"prefix.value1.max", "value"=>6)
183
- expect(gauges).to include("name"=>"prefix.value1.min", "value"=>4)
184
- end
185
- forwarder.go!
186
- end
187
-
188
168
  it "adds metadata about the entire batch of stats" do
189
169
  (1..4).each { |index| client.measure("value_stat#{index}", 0) }
190
170
  (1..7).each { |index| client.increment("counter_stat#{index}") }
@@ -207,9 +187,7 @@ describe Metricize do
207
187
  client.measure('value_stat2', 7)
208
188
  RestClient.should_receive(:post).with do | _, post_data |
209
189
  gauges = JSON.parse(post_data)['gauges']
210
- expect(gauges).to include("name"=>"prefix.value_stat1.25e", "value"=>5.0)
211
190
  expect(gauges).to include("name"=>"prefix.value_stat1.50e", "value"=>10.0)
212
- expect(gauges).to include("name"=>"prefix.value_stat1.75e", "value"=>15.0)
213
191
  expect(gauges).to include("name"=>"prefix.value_stat1.95e", "value"=>19.0)
214
192
  expect(gauges).to include("name"=>"prefix.value_stat2.95e", "value"=>7.0)
215
193
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metricize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt McNeil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-31 00:00:00.000000000 Z
11
+ date: 2013-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -168,7 +168,9 @@ description: Simple client/forwarder system to aggregate metrics and periodicall
168
168
  send them to a stats service
169
169
  email:
170
170
  - mmcneil@liveworld.com
171
- executables: []
171
+ executables:
172
+ - autospec
173
+ - rspec
172
174
  extensions: []
173
175
  extra_rdoc_files: []
174
176
  files:
@@ -177,6 +179,8 @@ files:
177
179
  - LICENSE.txt
178
180
  - README.md
179
181
  - Rakefile
182
+ - bin/autospec
183
+ - bin/rspec
180
184
  - lib/metricize.rb
181
185
  - lib/metricize/client.rb
182
186
  - lib/metricize/forwarder.rb
@@ -207,7 +211,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
211
  version: '0'
208
212
  requirements: []
209
213
  rubyforge_project:
210
- rubygems_version: 2.0.3
214
+ rubygems_version: 2.1.3
211
215
  signing_key:
212
216
  specification_version: 4
213
217
  summary: Collect, aggregate, and send metrics to a stats service