We bill some resources based on amount, others on duration. For 'VmCores', for instance, the core counts are stored in the amount column of billing records and charges are based on duration. 10 minutes of standard-4 vm usage would be calculated as `10 (duration) x 2 (amount) x rate_for_standard_core`. 'GitHubRunnerMinutes' billing records, on the other hand, store used minutes in the amount column and billing is based on that amount. For instance, 10 minutes of standard-4 runner usage would be calculated as `1 (duration) x 10 (amount) x rate_for_standard_4_runner_minute`. Currently, 'GitHubRunnerMinutes' is the only category we bill by amount, but 'InferenceTokens' are planned to be billed in the same way. This commit adds a billed_by field to the rates in billing_rates.yml to explicitly specify whether a resource is billed by `duration` or by `amount`.
1.9 KiB
1.9 KiB