( options: BuildPerfMemoryResponseOptions, kind: PerfKind, )
| 519 | } |
| 520 | |
| 521 | function resolveMemorySnapshotOutPath( |
| 522 | options: BuildPerfMemoryResponseOptions, |
| 523 | kind: PerfKind, |
| 524 | ): string { |
| 525 | if (options.out) return SessionStore.expandHome(options.out, options.cwd); |
| 526 | const extension = |
| 527 | kind === 'android-hprof' ? 'hprof' : kind === 'memgraph' ? 'memgraph' : 'artifact'; |
| 528 | const timestamp = new Date().toISOString().replace(/[:.]/g, '-'); |
| 529 | const sessionDir = options.sessionStore.ensureSessionDir(options.sessionName); |
| 530 | return path.join(sessionDir, 'artifacts', `memory-${kind}-${timestamp}.${extension}`); |
| 531 | } |
| 532 | |
| 533 | function unsupportedMemorySnapshotArtifact( |
| 534 | session: SessionState, |
no test coverage detected