Fix throughput cost estimate in add collection panel (#1070)

This commit is contained in:
victor-meng
2021-09-15 13:05:55 -07:00
committed by GitHub
parent 2d945c8231
commit 665270296f
9 changed files with 117 additions and 134 deletions

View File

@@ -125,7 +125,8 @@ export class OfferPricing {
S3Price: 0.1344,
Standard: {
StartingPrice: 24 / hoursInAMonth, // per hour
PricePerRU: 0.00008,
SingleMasterPricePerRU: 0.00008,
MultiMasterPricePerRU: 0.00016,
PricePerGB: 0.25 / hoursInAMonth,
},
},
@@ -137,7 +138,8 @@ export class OfferPricing {
S3Price: 0.6,
Standard: {
StartingPrice: OfferPricing.MonthlyPricing.mooncake.Standard.StartingPrice / hoursInAMonth, // per hour
PricePerRU: 0.00051,
SingleMasterPricePerRU: 0.00051,
MultiMasterPricePerRU: 0.00102,
PricePerGB: OfferPricing.MonthlyPricing.mooncake.Standard.PricePerGB / hoursInAMonth,
},
},

View File

@@ -2,11 +2,11 @@ import * as Constants from "./Constants";
export function computeRUUsagePrice(serverId: string, requestUnits: number): string {
if (serverId === "mooncake") {
const ruCharge = requestUnits * Constants.OfferPricing.HourlyPricing.mooncake.Standard.PricePerRU;
const ruCharge = requestUnits * Constants.OfferPricing.HourlyPricing.mooncake.Standard.SingleMasterPricePerRU;
return calculateEstimateNumber(ruCharge) + " " + Constants.OfferPricing.HourlyPricing.mooncake.Currency;
}
const ruCharge = requestUnits * Constants.OfferPricing.HourlyPricing.default.Standard.PricePerRU;
const ruCharge = requestUnits * Constants.OfferPricing.HourlyPricing.default.Standard.SingleMasterPricePerRU;
return calculateEstimateNumber(ruCharge) + " " + Constants.OfferPricing.HourlyPricing.default.Currency;
}