metriks-addons 3.0.1 → 3.0.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: d03052949042da520ea9baee5b2fb0a5393b611b
4
- data.tar.gz: ae75309d86c7fb6a407236b58389e5a0ffe91509
3
+ metadata.gz: b87ff8ce94b283989659aee055996133bd0b9d6e
4
+ data.tar.gz: b32c67b731da0fe2838466015dacf5afe80fdf8e
5
5
  SHA512:
6
- metadata.gz: d9b0c7def67893d7565ccb64d371837d7cf9a7948043478c74c451163dde6b222fce140abdf852e4c7f330f9a65b55ffba696fd6d102173f2426216719d549d0
7
- data.tar.gz: 25ea315cb8a84fe784c61efefccd21ff9642001f2efa9ba8c30a58ed8c74bee386bef174bb31be3cbc148010a4105b06db8d43674760858b0a7277d48afc947f
6
+ metadata.gz: 58fa4a57073b07d8de67961c971580b9858cf54ed044f654bce361d6cf5c802286ae91321fc17f7025cd6a9a1bbdb96d14f25397aa550a8934714742bac9c897
7
+ data.tar.gz: 475d780d15e849204f9448409bd259017edef32d39853fe6a2f4bfc01399ba2dddc73ab7e951474f33b02d1ec5c4f8fdd92698b09c7654863558ffeb82b7da5d
@@ -37,7 +37,7 @@ module MetriksAddons
37
37
  response = RestClient.post "#{@hostname}?orgid=#{@orgid}",
38
38
  jsonstr,
39
39
  :content_type => :json, :accept => :json, :'X-SF-TOKEN' => @x_sf_token
40
- log "info", "Sent #{datapoints.size} metrics to SignalFX"
40
+ log "debug", "Sent #{datapoints.size} metrics to SignalFX"
41
41
  log "debug", "Response is: #{response}"
42
42
  end
43
43
 
@@ -68,25 +68,12 @@ module MetriksAddons
68
68
  gauge |= create_datapoints name, metric, time, [
69
69
  :value
70
70
  ]
71
- when Metriks::UtilizationTimer
71
+ when Metriks::Timer
72
72
  counter |= create_datapoints name, metric, time, [
73
- :count, :mean_rate, :min, :max, :mean, :stddev,
74
- :mean_utilization
75
- ], [
76
- :median
77
- ]
78
-
79
- when Metriks::Timer
80
- counter |= create_datapoints name, metric, time, [
81
- :count, :mean_rate, :min, :max, :mean, :stddev
82
- ], [
83
- :median
73
+ :count
84
74
  ]
85
- when Metriks::Histogram
86
- counter |= create_datapoints name, metric, time, [
87
- :count, :min, :max, :mean, :stddev
88
- ], [
89
- :median
75
+ gauge |= create_datapoints name, metric, time, [
76
+ :min, :max, :mean
90
77
  ]
91
78
  end
92
79
  end
@@ -3,5 +3,5 @@ require 'metriks-addons/signalfx_reporter'
3
3
  require 'metriks-addons/cloudwatch_reporter'
4
4
 
5
5
  module MetriksAddons
6
- VERSION = '3.0.1'
6
+ VERSION = '3.0.2'
7
7
  end
@@ -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 = 'metriks-addons'
16
- s.version = '3.0.1'
17
- s.date = '2015-11-05'
16
+ s.version = '3.0.2'
17
+ s.date = '2015-11-17'
18
18
 
19
19
  ## Make sure your summary is short. The description may be as long
20
20
  ## as you like.
@@ -50,76 +50,27 @@ describe "Smoke test" do
50
50
  it "timer" do
51
51
  @registry.timer('timer.testing').update(1.5)
52
52
  datapoints = @reporter.get_datapoints
53
- expect(datapoints[:counter].size).to eql(7)
53
+ expect(datapoints[:counter].size).to eql(1)
54
+ expect(datapoints[:gauge].size).to eql(3)
54
55
  expect(datapoints[:counter][0][:metric]).to eql("timer.testing.count")
55
56
  expect(datapoints[:counter][0][:value]).to eql(1)
56
57
  expect(datapoints[:counter][0][:dimensions]).to include(:env => "test")
57
58
  expect(datapoints[:counter][0][:timestamp]).not_to be_nil
58
59
 
59
- expect(datapoints[:counter][1][:metric]).to eql("timer.testing.mean_rate")
60
- expect(datapoints[:counter][1][:value]).not_to be_nil
61
- expect(datapoints[:counter][1][:dimensions]).to include(:env => "test")
62
- expect(datapoints[:counter][1][:timestamp]).not_to be_nil
63
-
64
- expect(datapoints[:counter][2][:metric]).to eql("timer.testing.min")
65
- expect(datapoints[:counter][2][:value]).not_to be_nil
66
- expect(datapoints[:counter][2][:dimensions]).to include(:env => "test")
67
- expect(datapoints[:counter][2][:timestamp]).not_to be_nil
68
-
69
- expect(datapoints[:counter][3][:metric]).to eql("timer.testing.max")
70
- expect(datapoints[:counter][3][:value]).not_to be_nil
71
- expect(datapoints[:counter][3][:dimensions]).to include(:env => "test")
72
- expect(datapoints[:counter][3][:timestamp]).not_to be_nil
73
-
74
- expect(datapoints[:counter][4][:metric]).to eql("timer.testing.mean")
75
- expect(datapoints[:counter][4][:value]).not_to be_nil
76
- expect(datapoints[:counter][4][:dimensions]).to include(:env => "test")
77
- expect(datapoints[:counter][4][:timestamp]).not_to be_nil
78
-
79
- expect(datapoints[:counter][5][:metric]).to eql("timer.testing.stddev")
80
- expect(datapoints[:counter][5][:value]).not_to be_nil
81
- expect(datapoints[:counter][5][:dimensions]).to include(:env => "test")
82
- expect(datapoints[:counter][5][:timestamp]).not_to be_nil
83
-
84
- expect(datapoints[:counter][6][:metric]).to eql("timer.testing.median")
85
- expect(datapoints[:counter][6][:value]).not_to be_nil
86
- expect(datapoints[:counter][6][:dimensions]).to include(:env => "test")
87
- expect(datapoints[:counter][6][:timestamp]).not_to be_nil
88
- end
89
-
90
- it "histogram" do
91
- @registry.histogram('histogram.testing').update(1.5)
92
- datapoints = @reporter.get_datapoints
93
- expect(datapoints[:counter].size).to eql(6)
94
- expect(datapoints[:counter][0][:metric]).to eql("histogram.testing.count")
95
- expect(datapoints[:counter][0][:value]).to eql(1)
96
- expect(datapoints[:counter][0][:dimensions]).to include(:env => "test")
97
- expect(datapoints[:counter][0][:timestamp]).not_to be_nil
98
-
99
- expect(datapoints[:counter][1][:metric]).to eql("histogram.testing.min")
100
- expect(datapoints[:counter][1][:value]).not_to be_nil
101
- expect(datapoints[:counter][1][:dimensions]).to include(:env => "test")
102
- expect(datapoints[:counter][1][:timestamp]).not_to be_nil
103
-
104
- expect(datapoints[:counter][2][:metric]).to eql("histogram.testing.max")
105
- expect(datapoints[:counter][2][:value]).not_to be_nil
106
- expect(datapoints[:counter][2][:dimensions]).to include(:env => "test")
107
- expect(datapoints[:counter][2][:timestamp]).not_to be_nil
108
-
109
- expect(datapoints[:counter][3][:metric]).to eql("histogram.testing.mean")
110
- expect(datapoints[:counter][3][:value]).not_to be_nil
111
- expect(datapoints[:counter][3][:dimensions]).to include(:env => "test")
112
- expect(datapoints[:counter][3][:timestamp]).not_to be_nil
60
+ expect(datapoints[:gauge][0][:metric]).to eql("timer.testing.min")
61
+ expect(datapoints[:gauge][0][:value]).not_to be_nil
62
+ expect(datapoints[:gauge][0][:dimensions]).to include(:env => "test")
63
+ expect(datapoints[:gauge][0][:timestamp]).not_to be_nil
113
64
 
114
- expect(datapoints[:counter][4][:metric]).to eql("histogram.testing.stddev")
115
- expect(datapoints[:counter][4][:value]).not_to be_nil
116
- expect(datapoints[:counter][4][:dimensions]).to include(:env => "test")
117
- expect(datapoints[:counter][4][:timestamp]).not_to be_nil
65
+ expect(datapoints[:gauge][1][:metric]).to eql("timer.testing.max")
66
+ expect(datapoints[:gauge][1][:value]).not_to be_nil
67
+ expect(datapoints[:gauge][1][:dimensions]).to include(:env => "test")
68
+ expect(datapoints[:gauge][1][:timestamp]).not_to be_nil
118
69
 
119
- expect(datapoints[:counter][5][:metric]).to eql("histogram.testing.median")
120
- expect(datapoints[:counter][5][:value]).not_to be_nil
121
- expect(datapoints[:counter][5][:dimensions]).to include(:env => "test")
122
- expect(datapoints[:counter][5][:timestamp]).not_to be_nil
70
+ expect(datapoints[:gauge][2][:metric]).to eql("timer.testing.mean")
71
+ expect(datapoints[:gauge][2][:value]).not_to be_nil
72
+ expect(datapoints[:gauge][2][:dimensions]).to include(:env => "test")
73
+ expect(datapoints[:gauge][2][:timestamp]).not_to be_nil
123
74
  end
124
75
 
125
76
  it "gauge" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metriks-addons
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajat Venkatesh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-05 00:00:00.000000000 Z
11
+ date: 2015-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metriks