(options: RunOptions)
| 384 | } |
| 385 | |
| 386 | function getConfigFromRunOptions(options: RunOptions): MemLabConfig { |
| 387 | let config = MemLabConfig.getInstance(); |
| 388 | if (options.workDir) { |
| 389 | fileManager.initDirs(config, {workDir: options.workDir}); |
| 390 | } else { |
| 391 | config = MemLabConfig.resetConfigWithTransientDir(); |
| 392 | } |
| 393 | if ('webWorker' in options) { |
| 394 | config.isAnalyzingMainThread = false; |
| 395 | const value = options.webWorker; |
| 396 | if (typeof value === 'string') { |
| 397 | config.targetWorkerTitle = value; |
| 398 | } |
| 399 | } else { |
| 400 | config.isAnalyzingMainThread = true; |
| 401 | } |
| 402 | config.isFullRun = !!options.snapshotForEachStep; |
| 403 | return config; |
| 404 | } |
| 405 | |
| 406 | async function setupPage(page: Page, options: APIOptions = {}): Promise<void> { |
| 407 | const config = options.config ?? defaultConfig; |
no test coverage detected
searching dependent graphs…