cloudspeq 0.0.15 → 0.0.16

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: 54e96a5a8ca4132e21346042feffd9eb8682ea48
4
- data.tar.gz: d64a3fcea08a178fb9ff76f162d347c8b6cdcc67
3
+ metadata.gz: 850c0190656d040dfa41cbcce35b7a7515e44b33
4
+ data.tar.gz: e6adc5458856076f186565725df4a8e656988b32
5
5
  SHA512:
6
- metadata.gz: 6612dbce34c281ff7cd1737b9f4e0d66723e52aff60acb0ca91f0a35c43825fbd1db4a842811f7d7de41b527efccc6c5cea5bb05f0e903a5541de928947d1eff
7
- data.tar.gz: 1be896879bb52b6361ddeadd237cbd260e25c38cebaec59771f1d550897fad11c8618354a962a430092d46e10498ac8603a14ed808675dd075b7ec827849d278
6
+ metadata.gz: 51366ea1981bed0afa236878bbc0e7e8ef1f5faff2462aefaf4b6b57be60d37ba6d936b6127a7d23cf2553ee5c9a3ee1b8f83ee40c5e8d2aca1023c2e30e6da3
7
+ data.tar.gz: dfdff32c01194684acc7222122ff3bebff12edf17f4829440caeaac91ce39883184099b79d367dacc195cda352eb328b57e8e266af39885a5dc3a9e3e3bb42f4
data/README.md CHANGED
@@ -15,7 +15,7 @@ To address this, cloudspeq throws computing power at it.
15
15
  - Scalable: Can work with 10 machines, or 100.
16
16
  - Controlable: You control what kind of machines to use, how many, and for how long. You also control which provider to use (so long as its digital ocean)
17
17
  - Load Balanced: specs are parsed for definitions and randomly distributed across machines to reduce testing hotspots
18
- - Princesses: Some directories / files / specs need special attention. Set aside machines to focus specifically on them
18
+ - clusters: Some directories / files / specs need special attention. Set aside machines to focus specifically on them
19
19
  - Safe: Ignores other machines on the provider that do not relate to testing
20
20
  - More Safe: Machines can self-destruct to ensure you dont get charged for machines you're not using
21
21
 
@@ -165,27 +165,25 @@ Most commands have a short-hand that is a few letters long. See `cloudspeq -h` f
165
165
 
166
166
  While cloudspeq can dramtically speed things up out of the box, with some tuning you can get things running even faster.
167
167
 
168
- ### Princesses
168
+ ### Clusters
169
169
 
170
- While Cloudspeq load-balancing can reduce hotspots, Some specs need to be pampered to get the most out of them. These can be directories, files, or specific specs.
170
+ While Cloudspeq load-balancing can reduce hotspots, Sometimes you need to isolate the slow specs. By defining a cluster, you can dedicate machines to focus on something in particular, in order to reduce the overall time it takes for the test suite to execute. it can take some tinkering to identify an ideal configuation for your particular app.
171
171
 
172
- By defining a princess, you can dedicate machines to focus on something in particular, in order to reduce the overall time it takes for the test suite to execute. it can take some tinkering to identify an ideal configuation for your particular app.
173
-
174
- By default, all specs are distributed and run under a default princess "misc", where misc has a machine pool equal to the number of machines defined. When you define a princess, machines are set aside from those available, and the specs that are sent to them are removed from misc. The 'misc' group is the catch-all, and you'll get an error if there is not at least 1 machine available for it.
172
+ By default, all specs are distributed and run under a default cluster "misc", where misc has a machine pool equal to the number of machines defined. When you define a cluster, machines are set aside from those available, and the specs that are sent to them are removed from misc. The 'misc' group is the catch-all, and you'll get an error if there is not at least 1 machine available for it.
175
173
 
176
174
  The order matters, so its best to be specific at the top and general at the bottom.
177
175
 
178
- an example princesses definition looks like:
176
+ an example clusters definition looks like:
179
177
 
180
178
  ```
181
- princesses:
179
+ clusters:
182
180
  "controllers/search_controller_spec.rb": {servers: 2, symbol: 'G'}
183
181
  "controllers/store": {servers: 4, symbol: "S", threads: 2}
184
182
  "acceptance": {servers: 2, symbol: 'A', per: 1}
185
183
  "models": {servers: 3, symbol: 'M', load_balance: false}
186
184
  ```
187
185
 
188
- Each princess consists of:
186
+ Each cluster consists of:
189
187
 
190
188
  1. a directory, file, or line number to test; as the key
191
189
  2. a hash value containing
@@ -195,11 +193,11 @@ Each princess consists of:
195
193
  4. `threads` controls the number of SSH connections to make to each machine, by default just 1. Useful if your tests can run in paralell without interfering with each other in the database, and you want to drive the machine harder.
196
194
  5. `per` defines how many specs each thread should receive. by default it is number of specs / number of threads, but if you specify a lower number it will cause machines to come back after finishing and be available for additional specs to work on, instead of sitting idle after they've finished.
197
195
 
198
- If you define a 'misc' princess (with 'misc' as the key) as the last definition, you can adjust these parameters as they apply to any specs that fall in the misc group. This is also useful if you want to experiment with how long the specs take to run with a given number of machines.
196
+ If you define a 'misc' cluster (with 'misc' as the key) as the last definition, you can adjust these parameters as they apply to any specs that fall in the misc group. This is also useful if you want to experiment with how long the specs take to run with a given number of machines.
199
197
 
200
198
  ### Spec Tuning
201
199
 
202
- To optimize your tests to run with cloudspeq, they should be fast. Load-balancing and Princesses can help a lot, but in the end you'll only be able to be as fast as your slowest spec. If you have a spec that checks 6 different things and takes 6 seconds to run, you can optimize it by breaking it up into different specs, so that load-balancing can distribute the load across multiple machines.
200
+ To optimize your tests to run with cloudspeq, they should be fast. Load-balancing and clusters can help a lot, but in the end you'll only be able to be as fast as your slowest spec. If you have a spec that checks 6 different things and takes 6 seconds to run, you can optimize it by breaking it up into different specs, so that load-balancing can distribute the load across multiple machines.
203
201
 
204
202
  ## Roadmap
205
203
 
@@ -12,7 +12,7 @@ class Cloudspeq
12
12
  @proccessed = []
13
13
  @code_returns = []
14
14
  time = Benchmark.measure do
15
- test_princesses
15
+ test_clusters
16
16
  test_remaining
17
17
  @threads.each(&:join)
18
18
  end
@@ -23,9 +23,9 @@ class Cloudspeq
23
23
  private
24
24
 
25
25
 
26
- def self.test_princesses
27
- if @settings.princesses
28
- specified_servers = @settings.princesses.reject{|k,v| k == 'misc'}
26
+ def self.test_clusters
27
+ if @settings.clusters
28
+ specified_servers = @settings.clusters.reject{|k,v| k == 'misc'}
29
29
  if specified_servers.empty?
30
30
  specified_servers = @machines.count
31
31
  else
@@ -35,7 +35,7 @@ class Cloudspeq
35
35
  puts "ERROR: not enough servers. #{@machines.count} available, but #{specified_servers} needed"
36
36
  return false
37
37
  end
38
- @settings.princesses.each do |k,v|
38
+ @settings.clusters.each do |k,v|
39
39
  next if k == 'misc'
40
40
  specs = parse_specs(k,v) - @proccessed
41
41
  @proccessed.concat specs
@@ -46,8 +46,8 @@ class Cloudspeq
46
46
 
47
47
  def self.test_remaining
48
48
  remaining = parse_specs - @proccessed
49
- if @settings.princesses && @settings.princesses['misc']
50
- options = {'servers' => @machines.count, 'load_balance' => false, 'symbol' => '.'}.merge @settings.princesses['misc']
49
+ if @settings.clusters && @settings.clusters['misc']
50
+ options = {'servers' => @machines.count, 'load_balance' => false, 'symbol' => '.'}.merge @settings.clusters['misc']
51
51
  else
52
52
  options = {'servers' => @machines.count, 'load_balance' => false}
53
53
  end
@@ -1,3 +1,3 @@
1
1
  class Cloudspeq
2
- VERSION = "0.0.15"
2
+ VERSION = "0.0.16"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudspeq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Russell Jennings