Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. const decimal executionCountCost = 0.20m / 1000000m;
  2. const decimal gbSecCost = 0.000016m;
  3. const decimal executionUnitsToGbSecConversion = 1m / (1024 * 1000);
  4.  
  5. long executionCountPerHour = 6500012;
  6. long executionUnitsPerHour = 90305037184;
  7. int runDurationDays = 9;
  8.  
  9. Console.WriteLine("All prices in USD");
  10.  
  11. decimal gbSecPerHour = executionUnitsPerHour * executionUnitsToGbSecConversion;
  12. Console.WriteLine("GB-seconds per hour: " + Math.Round(gbSecPerHour, 0));
  13.  
  14. decimal costPerHour = (executionCountPerHour * executionCountCost) + (gbSecPerHour * gbSecCost);
  15. Console.WriteLine("Cost per hour: $" + Math.Round(costPerHour,2));
  16.  
  17. decimal costPerDay = costPerHour * 24;
  18. Console.WriteLine("Cost per day: $" + Math.Round(costPerDay, 2));
  19.  
  20. decimal totalCost = costPerDay * runDurationDays;
  21. Console.WriteLine("Total run cost: $" + Math.Round(totalCost, 2));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement