Created
January 21, 2015 18:19
-
-
Save stormy/b19c307093c4782ac10a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maxCpuPerUnitPrice = 0 | |
optimalInstanceType = null | |
For each instance_type in (Availability Zone, Region) { | |
cpuPerUnitPrice = instance.cpuCores/instance.spotPrice | |
if (maxCpuPerUnitPrice < cpuPerUnitPrice) { | |
optimalInstanceType = instance_type; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment