Skip to content

Instantly share code, notes, and snippets.

@phuongnd08
Created October 14, 2014 10:04
Show Gist options
  • Save phuongnd08/219c30fafd989eeb8c05 to your computer and use it in GitHub Desktop.
Save phuongnd08/219c30fafd989eeb8c05 to your computer and use it in GitHub Desktop.
Circle CI parallelism execution time
container0 = <<-STR
Starting the build00:00
Start container (0)00:02config
checkout
Restore source cache00:03cache
Checkout using deploy key 00:07config
machine
Configure the build00:00cache
Restore cache00:19cache
dependencies
Exporting RAILS_ENV, RACK_ENV (0)00:00inference
bundle install (0)00:03inference
$ ./generate_ionic_config.rb web Debug (0)00:00config
$ ./build_for_ci.sh (0)00:38config
database
Generate database.yml (0)00:00inference
Generate mongoid.yml (v3) (0)00:00inference
bundle exec rake db:create db:schema:load --trace (0)00:10inference
Save cache00:00cache
test
$ bundle exec rake test:warmup RAILS_ENV=test (0)00:56config
Parallel RSpec (0)01:25inference
Parallel Cucumber (0)03:58inference
teardown
Collect test metadata (0)00:01
Collect artifacts (0)00:01
STR
container1 = <<-STR
Starting the build00:00
Start container (1)00:02config
checkout
Restore source cache00:03cache
Checkout using deploy key 00:02config
machine
Configure the build00:00cache
Restore cache00:19cache
dependencies
Exporting RAILS_ENV, RACK_ENV (1)00:00inference
bundle install (1)00:03inference
$ ./generate_ionic_config.rb web Debug (1)00:00config
$ ./build_for_ci.sh (1)00:37config
database
Generate database.yml (1)00:00inference
Generate mongoid.yml (v3) (1)00:00inference
bundle exec rake db:create db:schema:load --trace (1)00:09inference
Save cache00:00cache
test
$ bundle exec rake test:warmup RAILS_ENV=test (1)00:54config
Parallel RSpec (1)00:17inference
Parallel Cucumber (1)05:48inference
teardown
Collect test metadata (1)00:01
Collect artifacts (1)00:01
STR
container2 = <<-STR
Starting the build00:00
Start container (2)00:02config
checkout
Restore source cache00:03cache
Checkout using deploy key 00:02config
machine
Configure the build00:00cache
Restore cache00:19cache
dependencies
Exporting RAILS_ENV, RACK_ENV (2)00:00inference
bundle install (2)00:03inference
$ ./generate_ionic_config.rb web Debug (2)00:00config
$ ./build_for_ci.sh (2)00:35config
database
Generate database.yml (2)00:00inference
Generate mongoid.yml (v3) (2)00:00inference
bundle exec rake db:create db:schema:load --trace (2)00:09inference
Save cache00:00cache
test
$ bundle exec rake test:warmup RAILS_ENV=test (2)00:50config
Parallel RSpec (2)00:18inference
Parallel Cucumber (2)04:34inference
teardown
Collect test metadata (2)00:01
Collect artifacts (2)00:02
.
Done!
STR
container3 = <<-STR
Starting the build00:00
Start container (3)00:03config
checkout
Restore source cache00:03cache
Checkout using deploy key 00:02config
machine
Configure the build00:00cache
Restore cache00:19cache
dependencies
Exporting RAILS_ENV, RACK_ENV (3)00:00inference
bundle install (3)00:03inference
$ ./generate_ionic_config.rb web Debug (3)00:00config
$ ./build_for_ci.sh (3)00:35config
database
Generate database.yml (3)00:00inference
Generate mongoid.yml (v3) (3)00:00inference
bundle exec rake db:create db:schema:load --trace (3)00:09inference
Save cache00:00cache
test
$ bundle exec rake test:warmup RAILS_ENV=test (3)00:51config
Parallel RSpec (3)00:38inference
Parallel Cucumber (3)04:15inference
teardown
Collect test metadata (3)00:01
Collect artifacts (3)00:01
STR
[container0, container1, container2, container3].each_with_index do |container, index|
puts "===> Container ##{index} details"
times = container.scan(/\d{2}\:\d{2}/)
puts times.join("\n")
end
[container0, container1, container2, container3].each_with_index do |container, index|
puts "===> Container ##{index} total"
times = container.scan(/\d{2}\:\d{2}/)
total_time = times.inject(0) do |total, time|
min, sec = time.split(":").map(&:to_i)
total += min * 60 + sec
end
puts "#{total_time/60}:#{total_time % 60}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment