Skip to content

Commit e77b14b

Browse files
committed
add restore count
1 parent 1f76bc7 commit e77b14b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/cli-v3/src/entryPoints/managed/controller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export class ManagedRunController {
6060
private readonly snapshotPoller: RunExecutionSnapshotPoller;
6161

6262
private warmStartCount = 0;
63+
private restoreCount = 0;
6364

6465
constructor(opts: ManagedRunControllerOptions) {
6566
const env = new RunnerEnv(opts.env);
@@ -143,6 +144,7 @@ export class ManagedRunController {
143144
get metrics() {
144145
return {
145146
warmStartCount: this.warmStartCount,
147+
restoreCount: this.restoreCount,
146148
};
147149
}
148150

@@ -601,6 +603,7 @@ export class ManagedRunController {
601603
}
602604

603605
// There are waitpoints to complete so we've been restored after being suspended
606+
this.restoreCount++;
604607

605608
// Short delay to give websocket time to reconnect
606609
await sleep(100);
@@ -1444,6 +1447,7 @@ export class ManagedRunController {
14441447
properties: {
14451448
...opts.properties,
14461449
warmStartCount: this.warmStartCount,
1450+
restoreCount: this.restoreCount,
14471451
},
14481452
});
14491453
}

0 commit comments

Comments
 (0)