dynamo-autoscale 0.3.6 → 0.4.1
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.
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +13 -8
- data/README.md +5 -1
- data/bin/dynamo-autoscale +30 -19
- data/config/environment/common.rb +73 -18
- data/config/environment/test.rb +25 -2
- data/config/services/aws.rb +18 -2
- data/config/services/logger.rb +20 -21
- data/lib/dynamo-autoscale/actioner.rb +1 -0
- data/lib/dynamo-autoscale/dynamo_actioner.rb +3 -2
- data/lib/dynamo-autoscale/fake_poller.rb +40 -0
- data/lib/dynamo-autoscale/log_collector.rb +18 -0
- data/lib/dynamo-autoscale/logger.rb +5 -1
- data/lib/dynamo-autoscale/metrics.rb +11 -28
- data/lib/dynamo-autoscale/poller.rb +17 -6
- data/lib/dynamo-autoscale/random_data_generator.rb +51 -0
- data/lib/dynamo-autoscale/scale_report.rb +2 -2
- data/lib/dynamo-autoscale/table_tracker.rb +56 -13
- data/lib/dynamo-autoscale/unit_cost.rb +42 -14
- data/lib/dynamo-autoscale/version.rb +1 -1
- data/script/historic_data +1 -1
- data/script/random_test +68 -0
- data/script/test +4 -3
- data/spec/config_spec.rb +72 -0
- data/spec/dispatcher_spec.rb +56 -0
- data/spec/helpers/environment_helper.rb +15 -0
- data/spec/helpers/logger.rb +20 -0
- data/spec/poller_spec.rb +39 -0
- data/spec/spec_helper.rb +0 -3
- data/spec/table_tracker_spec.rb +163 -0
- data/spec/unit_cost_spec.rb +39 -0
- metadata +13 -3
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe DynamoAutoscale::UnitCost do
|
4
|
+
context 'region: us-east-1' do
|
5
|
+
before { AWS.config(region: 'us-east-1') }
|
6
|
+
|
7
|
+
specify "#write should return a number" do
|
8
|
+
subject.class.write(50).should be_a Float
|
9
|
+
end
|
10
|
+
|
11
|
+
specify "#read should return a number" do
|
12
|
+
subject.class.read(50).should be_a Float
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
context 'region: us-west-1' do
|
17
|
+
before { AWS.config(region: 'us-west-1') }
|
18
|
+
|
19
|
+
specify "#write should return a number" do
|
20
|
+
subject.class.write(50).should be_a Float
|
21
|
+
end
|
22
|
+
|
23
|
+
specify "#read should return a number" do
|
24
|
+
subject.class.read(50).should be_a Float
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
context 'region: not-a-region' do
|
29
|
+
before { AWS.config(region: 'not-a-region') }
|
30
|
+
|
31
|
+
specify "#write should return nil" do
|
32
|
+
subject.class.write(50).should be_nil
|
33
|
+
end
|
34
|
+
|
35
|
+
specify "#read should return nil" do
|
36
|
+
subject.class.read(50).should be_nil
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynamo-autoscale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir:
|
11
11
|
- bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|
@@ -142,12 +142,15 @@ files:
|
|
142
142
|
- lib/dynamo-autoscale/dispatcher.rb
|
143
143
|
- lib/dynamo-autoscale/dynamo_actioner.rb
|
144
144
|
- lib/dynamo-autoscale/ext/active_support/duration.rb
|
145
|
+
- lib/dynamo-autoscale/fake_poller.rb
|
145
146
|
- lib/dynamo-autoscale/local_actioner.rb
|
146
147
|
- lib/dynamo-autoscale/local_data_poll.rb
|
148
|
+
- lib/dynamo-autoscale/log_collector.rb
|
147
149
|
- lib/dynamo-autoscale/logger.rb
|
148
150
|
- lib/dynamo-autoscale/metrics.rb
|
149
151
|
- lib/dynamo-autoscale/poller.rb
|
150
152
|
- lib/dynamo-autoscale/pretty_formatter.rb
|
153
|
+
- lib/dynamo-autoscale/random_data_generator.rb
|
151
154
|
- lib/dynamo-autoscale/rule.rb
|
152
155
|
- lib/dynamo-autoscale/rule_set.rb
|
153
156
|
- lib/dynamo-autoscale/scale_report.rb
|
@@ -166,14 +169,21 @@ files:
|
|
166
169
|
- script/historic_data
|
167
170
|
- script/hourly_wastage
|
168
171
|
- script/monitor
|
172
|
+
- script/random_test
|
169
173
|
- script/simulator
|
170
174
|
- script/test
|
171
175
|
- script/validate_ruleset
|
172
176
|
- spec/actioner_spec.rb
|
177
|
+
- spec/config_spec.rb
|
178
|
+
- spec/dispatcher_spec.rb
|
179
|
+
- spec/helpers/environment_helper.rb
|
180
|
+
- spec/helpers/logger.rb
|
181
|
+
- spec/poller_spec.rb
|
173
182
|
- spec/rule_set_spec.rb
|
174
183
|
- spec/rule_spec.rb
|
175
184
|
- spec/spec_helper.rb
|
176
185
|
- spec/table_tracker_spec.rb
|
186
|
+
- spec/unit_cost_spec.rb
|
177
187
|
- templates/scale_report_email.erb
|
178
188
|
homepage: http://github.com/invisiblehand/dynamo-autoscale
|
179
189
|
licenses:
|
@@ -196,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
206
|
version: '0'
|
197
207
|
segments:
|
198
208
|
- 0
|
199
|
-
hash:
|
209
|
+
hash: 3560900520817525813
|
200
210
|
requirements:
|
201
211
|
- If you want to graph your tables, you'll need R with the ggplot and reshape packages
|
202
212
|
installed.
|