(cycle, tracked, options)
| 385 | } |
| 386 | |
| 387 | async function runAutomatedCycle(cycle, tracked, options) { |
| 388 | console.log(`Cycle ${cycle}/${options.cycles}: start recording`); |
| 389 | pressHotkey(HOTKEYS.startStudioRecording); |
| 390 | await sleep(options.recordingSeconds * 1000); |
| 391 | |
| 392 | if (!options.skipDisplaySleep) { |
| 393 | console.log( |
| 394 | `Cycle ${cycle}/${options.cycles}: sleep display for ${options.displaySleepSeconds}s`, |
| 395 | ); |
| 396 | sleepDisplay(); |
| 397 | await sleep(options.displaySleepSeconds * 1000); |
| 398 | } |
| 399 | |
| 400 | console.log(`Cycle ${cycle}/${options.cycles}: stop recording`); |
| 401 | pressHotkey(HOTKEYS.stopRecording); |
| 402 | await sleep(1000); |
| 403 | pressHotkey(HOTKEYS.stopRecording); |
| 404 | await sleep(3000); |
| 405 | |
| 406 | return collectPhase( |
| 407 | `cycle-${cycle}`, |
| 408 | options.settleSeconds, |
| 409 | options.intervalSeconds, |
| 410 | tracked, |
| 411 | options, |
| 412 | ); |
| 413 | } |
| 414 | |
| 415 | async function main() { |
| 416 | if (process.platform !== "darwin") { |
no test coverage detected