A feature to query the actual resource allocation time for compute sessions
Compute sessions have three status-related time fields: created_at, status_changed, and terminated_at. With these fields, we can query the total session lifetime, the time between PENDING and TERMINATED statuses, but unable to get the actual resource allocation time (PREPARING ~ TERMINATED). If a session stays long in PENDING status, the actual resource allocation time can greatly differ compared to the result of terminated_at - created_at.
Since the actual resource allocation time is useful to calculate the billing metric in cloud and on-premise sites, it would be good to support this feature.
Work in progress @ branch feature/469-actual-resource-allocation-time.
I temporarily added a command backend.ai session resource-allocation-time and it gives back a time info elapsed from PREPARING to TERMINATED.
GUI counterpart should also be implemented.