Skip to content

Commit 8da2e87

Browse files
feat: Track per-phase duration on each instance
1 parent a985151 commit 8da2e87

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 52
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/hypeman-75aa32bfceac1a349267baf08a13df9d8dc37fd07525f45675d064654eac0e1f.yml
3-
openapi_spec_hash: ff73a0e1f7a8bd5a5d1ae38d994bb9cd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel/hypeman-0aececd4fa79c47cb7222167d6746064c53b69eb70ee14252be71ccc31e6d2a2.yml
3+
openapi_spec_hash: c514624af74c74835e3187b857184ff2
44
config_hash: ed668fae8826ff533f38df16c9664f44

src/resources/instances/instances.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,16 @@ export interface Instance {
387387
*/
388388
auto_standby?: AutoStandbyPolicy;
389389

390+
/**
391+
* The lifecycle phase the instance is currently in.
392+
*/
393+
current_phase?: string;
394+
395+
/**
396+
* When the instance entered current_phase.
397+
*/
398+
current_phase_since?: string;
399+
390400
/**
391401
* Disk I/O rate limit (human-readable, e.g., "100MB/s")
392402
*/
@@ -438,6 +448,15 @@ export interface Instance {
438448
*/
439449
overlay_size?: string;
440450

451+
/**
452+
* Cumulative milliseconds the instance has spent in each lifecycle phase,
453+
* including time accrued in the current phase up to the response time. Keys mirror
454+
* instance states lowercased (running, standby, paused, stopped, created,
455+
* initializing, shutdown). Consumers (e.g. billing) sum the phases they consider
456+
* billable.
457+
*/
458+
phase_durations_ms?: { [key: string]: number };
459+
441460
/**
442461
* Base memory size (human-readable)
443462
*/

0 commit comments

Comments
 (0)