madecoste / swarming

Automatically exported from code.google.com/p/swarming
Apache License 2.0
0 stars 1 forks source link

Add a way to associate the cost of running a task #183

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Goal:
Know how much USD$ each task cost.

AI:
- Bot send a cost_usd along task_update for the cost of the task up to now. 
This means it would be calculated bot-side.

- Bot advertise their cost_usd_sec as the cost in USD$ per second in their 
'properties'. This is useful to calculate non-task work items like "rebooting 
$" and "idle time $".

- TaskResultSummary.cost_usd to be a FloatProperty in USD$ of the cost of 
running this task. It would be the sum of all TaskRunResult.cost_usd executed 
for this task. For simplicity when updating the entity and support for retries, 
there would be a TaskResultSummary.costs_usd being a repeated=True, then 
cost_usd would be a pseudo-property being the sum of these values.

- Expose this value in UI, calculate sums and stats.

Original issue reported on code.google.com by maruel@chromium.org on 1 Dec 2014 at 3:44

GoogleCodeExporter commented 9 years ago

Original comment by maruel@chromium.org on 1 Dec 2014 at 3:46

GoogleCodeExporter commented 9 years ago
TaskResultSummary.cost_usd was implemented.
The cost of rebooting was not implemented yet. It requires significant stats 
refactor so this will be postponed in a new bug.

Original comment by maruel@chromium.org on 9 Jan 2015 at 7:52