cloud-pipeline icon indicating copy to clipboard operation
cloud-pipeline copied to clipboard

Include run costs into export runs report

Open ekazachkova opened this issue 8 months ago • 0 comments

Background At the moment, POST /run/filter/export method does not include run costs into report and it would be nice to support it.

Approach

  1. Currently, run object provides the following information about prices:
  • computePricePerHour - virtual machine price per hour
  • diskPricePerHour - instance disk gigabyte price per hour
  • fsPricePerHour - filesystem price per hour taking into account its current capacity. This value shall be updated as per as the file system capacity is updated.
  • pricePerHour - overall run price per hour:
pricePerHour = computePricePerHour + <disk size GB> * diskPricePerHour + fsPricePerHour

pricePerHour value shall be updated after disk autoscaling process.

Note: run object does not provide full disk price per hour directly. But this value can be estimated as:

<full disk price> = pricePerHour - computePricePerHour - fsPricePerHour
  1. In case of cluster run, master run objects contains workersPrice - the estimated total price for all workers
  2. As far as run can be paused, compute costs shall be respected only for active periods.

Thereby, estimated run costs can be calculated the following way:

<run active hours> * computePricePerHour + <total run hours> * (pricePerHour - computePricePerHour) + workersPrice

ekazachkova avatar Feb 07 '25 14:02 ekazachkova