puppetlabs-toy-chest / puppetlabs-aws

Puppet module for managing AWS resources to build out infrastructure
Apache License 2.0
188 stars 216 forks source link

(maint) query instances across all regions concurrently #473

Open wkalt opened 7 years ago

wkalt commented 7 years ago

Query instances across regions concurrently to reduce the execution time of "puppet resource ec2_instance".

wkalt commented 7 years ago

Timings:

[~/work/puppetlabs-aws] (maint/async-instance-queries) $ time RUBYLIB=./lib puppet resource ec2_instance > /dev/null                                                                                                                          

real    0m4.366s                                                                                                                                                                                                                              
user    0m1.818s                                                                                                                                                                                                                              
sys     0m0.195s                                                                                                                                                                                                                              
[~/work/puppetlabs-aws] (maint/async-instance-queries) $ git checkout master                                                                                                                                                                  
Switched to branch 'master'                                                                                                                                                                                                                   
Your branch is up-to-date with 'origin/master'.                                                                                                                                                                                               
[~/work/puppetlabs-aws] (master) $ time RUBYLIB=./lib puppet resource ec2_instance > /dev/null                                                                                                                                                

real    0m16.760s                                                                                                                                                                                                                             
user    0m1.884s                                                                                                                                                                                                                              
sys     0m0.179s
wkalt commented 7 years ago

@hunner @DavidS can you see if this seems sane when you get a chance?

wkalt commented 7 years ago

travis failures look unrelated to me

gregohardy commented 6 years ago

taking a look. Travis failures don't appear to be related.