baleen 0.0.12 → 0.1.0

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: 678beb3c64654016c2a4e54b8e1148ab881e2b5e
4
- data.tar.gz: a14b6933d0f1abfbee504fdc42ac81c74e310124
3
+ metadata.gz: 8427ae101777b8e6bc365a2c18bb930a35fc3a8f
4
+ data.tar.gz: 15442644987967b6ef4452f66191bf532b10d0ab
5
5
  SHA512:
6
- metadata.gz: 4ca8f4cbc9b478e74e9fc4fda4a6b772cd92b7a6488553e5b7163a76a02d3d5e4699d90a3dc676881ef916fc33d4a155d38acfb7be7008e2f7f0a230b93abc70
7
- data.tar.gz: d552b9208fe90249a6f43c9f6642d5ac91cdfce5482e1484146eacefca7d9d269cff2f8b6431ce62b3a8575834f0bce4e0a4fc183b4ba47f289bb86c4a333bf9
6
+ metadata.gz: e7928c5a13b2170be1715039f5cbc652d849d15309f49cd63c45885f668c463706f857d315b7f1edf51298cbaed2f98fef7c1843a0cb8493ed970bffc887751c
7
+ data.tar.gz: ce5cbce8080d073b8c08ec90783a55c936556c6a459ce710be3788b3d77c0a2a2947f24e7c494a762748195a3d98f2d952e5ed04145329c6eb1f37738d90d934
data/bin/baleen CHANGED
@@ -12,6 +12,7 @@ class BaleenCommand < Thor
12
12
  option :before_command, :default => nil
13
13
  option :host, :default => "127.0.0.1"
14
14
  option :port, :default => "5533"
15
+ option :concurrency, :default => 2
15
16
  def cucumber
16
17
  client = Baleen::Client.new(options[:host], options[:port])
17
18
  request = Baleen::Message::Request::Cucumber.new(
@@ -19,6 +20,7 @@ class BaleenCommand < Thor
19
20
  work_dir: options[:work_dir],
20
21
  files: options[:files],
21
22
  before_command: options[:before_command],
23
+ concurrency: options[:concurrency].to_i,
22
24
  )
23
25
 
24
26
  job = Baleen::Job.new(client, request)
@@ -10,7 +10,7 @@ module Baleen
10
10
  end
11
11
 
12
12
  class Cucumber < Base
13
- def initialize(image: nil, work_dir: "./", files: "features", shell: "/bin/bash", opt: "-c", exe: "bundle exec cucumber", before_command: nil, command: nil)
13
+ def initialize(image: nil, work_dir: "./", files: "features", shell: "/bin/bash", opt: "-c", exe: "bundle exec cucumber", before_command: nil, command: nil, concurrency: 2)
14
14
  super()
15
15
  @params[:image] = image
16
16
  @params[:shell] = shell
@@ -20,6 +20,7 @@ module Baleen
20
20
  @params[:exe] = exe
21
21
  @params[:before_command] = before_command
22
22
  @params[:command] = command
23
+ @params[:concurrency] = concurrency
23
24
  end
24
25
  end
25
26
 
@@ -71,9 +71,10 @@ module Baleen
71
71
 
72
72
  def create_runners
73
73
  target_files.map {|file|
74
- @params.files = file
75
- Runner.new(@params)
76
- }.each_slice(CONCURRENCY).map {|r| r}
74
+ params = @params.dup
75
+ params.files = file
76
+ Runner.new(params)
77
+ }.each_slice(@params.concurrency).map {|r| r}
77
78
  end
78
79
 
79
80
  def target_files
@@ -1,3 +1,3 @@
1
1
  module Baleen
2
- VERSION = "0.0.12"
2
+ VERSION = "0.1.0"
3
3
  end
@@ -5,8 +5,8 @@ end
5
5
  Then /cpu intensive operation/ do
6
6
  t1 = Time.now
7
7
 
8
- rep = 100
9
- n = 100
8
+ rep = 10000
9
+ n = 10000
10
10
 
11
11
  x = Array.new(n, 0)
12
12
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baleen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim, Hirokuni