metricize 0.5.2 → 0.5.3

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: 93e3b5462b8af108a21490ed34afb2510d5840c1
4
- data.tar.gz: 05899e0480b5ed30692ae5082c742d6e785df5f6
3
+ metadata.gz: 11b9ae196c2d2bcad3ff04ae224c63088fb29e11
4
+ data.tar.gz: 60b74ef5f38a7913d87673343ba9e14e7cc79e03
5
5
  SHA512:
6
- metadata.gz: 00772e25703b0a621721d275190c070b38c9e3db0cdcf08bbd11868fdca77f79f5dee5f9737a841772541e56305039d83e4414b4da4a777d932e27238301235f
7
- data.tar.gz: 480e3ba029936eebaee79d7530b1c9733cb31eff1cf7fef2ae7b9b3cce1ee9704c7516586470894ee8be7598bb0d6909bd516f25b2093ee6e95d9792b233cade
6
+ metadata.gz: 7c8acaafe1f44c9f64fc64fd4a5517290db45cef43b222584711c375f01150c2fee2b4f18bae55ce526f44a3e1f9a7dca35a5ade9d41f5605c9acd2b39f1db24
7
+ data.tar.gz: 9c84fe2d4baa5ec3198e491f768358622afb577c4227736116459d5724e14cab4365407a20701c31ac2a962da6210a0cd7c5dfa48ff4092d24979fe0867fc330
@@ -58,7 +58,6 @@ module Metricize
58
58
  counters, measurements = metrics.partition {|metric| metric.fetch(:name) =~ /.count$/ }
59
59
  counters = consolidate_counts(counters)
60
60
  measurements = add_value_stats(measurements)
61
- measurements << add_stat_by_key(@queue_name + '.counters', counters.size)
62
61
  { :gauges => counters + measurements, :measure_time => Time.now.to_i }
63
62
  end
64
63
 
@@ -89,12 +88,12 @@ module Metricize
89
88
  with_error_handling do
90
89
  print_histogram(key, values)
91
90
  end
91
+ gauges << add_stat_by_key(key, values.size, '.count').merge(counter_attributes)
92
92
  [0.50, 0.95].each do |p|
93
93
  percentile = values.extend(Stats).calculate_percentile(p)
94
94
  gauges << add_stat_by_key(key, percentile, ".#{(p*100).to_i}e")
95
95
  end
96
96
  end
97
- gauges << add_stat_by_key(@queue_name + '.measurements', value_groups.size)
98
97
  gauges
99
98
  end
100
99
 
@@ -1,3 +1,3 @@
1
1
  module Metricize
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
@@ -165,13 +165,11 @@ describe Metricize do
165
165
  forwarder.go!
166
166
  end
167
167
 
168
- it "adds metadata about the entire batch of stats" do
169
- (1..4).each { |index| client.measure("value_stat#{index}", 0) }
170
- (1..7).each { |index| client.increment("counter_stat#{index}") }
168
+ it "adds the count of measurements to gauges" do
169
+ [4,5,6].each { |value| client.measure('value1', value) }
171
170
  RestClient.should_receive(:post).with do | url, post_data |
172
171
  gauges = JSON.parse(post_data)['gauges']
173
- expect(gauges).to include("name"=>"metricize_queue.measurements", "value"=>4)
174
- expect(gauges).to include("name"=>"metricize_queue.counters", "value"=>7)
172
+ expect(gauges).to include("name"=>"prefix.value1.count", "value"=>3, "attributes"=>{"source_aggregate"=>true, "summarize_function"=>"sum"})
175
173
  end
176
174
  forwarder.go!
177
175
  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.2
4
+ version: 0.5.3
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-09-24 00:00:00.000000000 Z
11
+ date: 2013-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler