Skip to content

Commit 94cb09f

Browse files
committed
Log restoreCheckpoint duration
1 parent d9ac8ef commit 94cb09f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/services/checkpoints/CheckpointService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,12 @@ export class CheckpointService {
354354
}
355355

356356
public async restoreCheckpoint(commitHash: string) {
357+
const startTime = Date.now()
357358
await this.ensureBranch(this.mainBranch)
358359
await this.git.clean([CleanOptions.FORCE, CleanOptions.RECURSIVE])
359360
await this.git.raw(["restore", "--source", commitHash, "--worktree", "--", "."])
361+
const duration = Date.now() - startTime
362+
this.log(`[restoreCheckpoint] restored checkpoint ${commitHash} in ${duration}ms`)
360363
this.currentCheckpoint = commitHash
361364
}
362365

0 commit comments

Comments
 (0)