(
baselineSnapshot: string,
targetSnapshot: string,
finalSnapshot: string,
options: {workDir?: string; consoleMode?: ConsoleMode} = {},
)
| 282 | * @returns leak traces detected and clustered from the browser interaction |
| 283 | */ |
| 284 | export async function findLeaksBySnapshotFilePaths( |
| 285 | baselineSnapshot: string, |
| 286 | targetSnapshot: string, |
| 287 | finalSnapshot: string, |
| 288 | options: {workDir?: string; consoleMode?: ConsoleMode} = {}, |
| 289 | ): Promise<ISerializedInfo[]> { |
| 290 | const state = stateManager.getAndUpdateState(defaultConfig, options); |
| 291 | defaultConfig.useExternalSnapshot = true; |
| 292 | defaultConfig.externalSnapshotFilePaths = [ |
| 293 | baselineSnapshot, |
| 294 | targetSnapshot, |
| 295 | finalSnapshot, |
| 296 | ]; |
| 297 | fileManager.initDirs(defaultConfig, {workDir: options.workDir}); |
| 298 | defaultConfig.chaseWeakMapEdge = false; |
| 299 | const ret = await analysis.checkLeak(); |
| 300 | stateManager.restoreState(defaultConfig, state); |
| 301 | return ret; |
| 302 | } |
| 303 | |
| 304 | /** |
| 305 | * This API analyzes heap snapshot(s) with a specified heap analysis. |
no test coverage detected
searching dependent graphs…