passenger-metrics 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4253eefcd53799123022aeee6e5f0f60df2685c7
4
- data.tar.gz: f51be74d6c4503a6c48c71ee64d775feb5523d6d
3
+ metadata.gz: 19607add3c1eba0885de2cd4b357cd2a2fdaaaec
4
+ data.tar.gz: 7d09e2131b6d75357ded041bad405de8cd325991
5
5
  SHA512:
6
- metadata.gz: a7a0cff0a03d344f4af6fe120f6137b34cdd7dec29bc6e9f0c3fa834428c6c96fc3912814a9918095b1259b17b72a5415204c9a9f71eabf054d057cde34bd276
7
- data.tar.gz: f5e410c4f676b368885f2c81b33ae7f4f18c3fd55c28ece11f1f6c78801bb2eabc2df8c06188e45f2cb93f642eaf3c64839e7c2b9ce617552cf8e665a6d590de
6
+ metadata.gz: 08c213d38ecbce23c589b543e009d5bf7ebd57d7411e68f6c27daf22f226d2b8f56cbf94bad4345c21d629d709563f30906cddc8609e467a24760f9dc8872913
7
+ data.tar.gz: 9ca01bd3bf795a4eab1ac59d58b3d3a342ea11a37f7a885ee133806d829fb6e02ed203a29468d57f71a5ae1e96f200935296a5cf9b83f147f72c7ffe7cd4b9b9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -43,7 +43,7 @@ module PassengerMetrics
43
43
  end
44
44
 
45
45
  def metric_name
46
- ENV["AWS_CLOUDWATCH_METRIC_NAME"] || DEFAULT_METRIC_NAME
46
+ metric.metric_name || ENV["AWS_CLOUDWATCH_METRIC_NAME"] || DEFAULT_METRIC_NAME
47
47
  end
48
48
 
49
49
  def dimension_name
@@ -0,0 +1,18 @@
1
+ module PassengerMetrics
2
+ module Metrics
3
+ class ProcessCount < PassengerMetrics::Metrics::Base
4
+ def unit
5
+ :count
6
+ end
7
+
8
+ def value
9
+ PassengerMetrics.status.info['process_count']
10
+ end
11
+
12
+ def metric_name
13
+ 'PassengerProcessCount'
14
+ end
15
+
16
+ end
17
+ end
18
+ end
@@ -8,6 +8,10 @@ module PassengerMetrics
8
8
  def value
9
9
  PassengerMetrics.status.info['get_wait_list_size']
10
10
  end
11
+
12
+ def metric_name
13
+ 'PassengerQueueLenght'
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -9,5 +9,6 @@ end
9
9
 
10
10
  require 'passenger-metrics/metrics/base'
11
11
  require 'passenger-metrics/metrics/queue_length'
12
+ require 'passenger-metrics/metrics/process_count'
12
13
  require 'passenger-metrics/status'
13
14
  require 'passenger-metrics/cloudwatch'
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: passenger-metrics 0.0.1 ruby lib
5
+ # stub: passenger-metrics 0.0.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "passenger-metrics"
9
- s.version = "0.0.1"
9
+ s.version = "0.0.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -34,11 +34,13 @@ Gem::Specification.new do |s|
34
34
  "lib/passenger-metrics.rb",
35
35
  "lib/passenger-metrics/cloudwatch.rb",
36
36
  "lib/passenger-metrics/metrics/base.rb",
37
+ "lib/passenger-metrics/metrics/process_count.rb",
37
38
  "lib/passenger-metrics/metrics/queue_length.rb",
38
39
  "lib/passenger-metrics/status.rb",
39
40
  "passenger-metrics.gemspec",
40
41
  "spec/fixtures/status.xml",
41
42
  "spec/passenger-metrics/cloudwatch_spec.rb",
43
+ "spec/passenger-metrics/metrics/process_count_spec.rb",
42
44
  "spec/passenger-metrics/status_spec.rb",
43
45
  "spec/passenger_metrics_spec.rb",
44
46
  "spec/spec_helper.rb",
@@ -0,0 +1,7 @@
1
+ require 'spec_helper'
2
+
3
+ describe PassengerMetrics::Metrics::ProcessCount do
4
+ it 'should have a metric name' do
5
+ expect(subject.metric_name).to eq('PassengerProcessCount')
6
+ end
7
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passenger-metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Woodhull
@@ -146,11 +146,13 @@ files:
146
146
  - lib/passenger-metrics.rb
147
147
  - lib/passenger-metrics/cloudwatch.rb
148
148
  - lib/passenger-metrics/metrics/base.rb
149
+ - lib/passenger-metrics/metrics/process_count.rb
149
150
  - lib/passenger-metrics/metrics/queue_length.rb
150
151
  - lib/passenger-metrics/status.rb
151
152
  - passenger-metrics.gemspec
152
153
  - spec/fixtures/status.xml
153
154
  - spec/passenger-metrics/cloudwatch_spec.rb
155
+ - spec/passenger-metrics/metrics/process_count_spec.rb
154
156
  - spec/passenger-metrics/status_spec.rb
155
157
  - spec/passenger_metrics_spec.rb
156
158
  - spec/spec_helper.rb