Skip to content

Commit 522e171

Browse files
thymikeeclaude
andcommitted
fix(perf): point memory snapshot hints only at fields the error carries
Two hints still asked for a --debug rerun under other wording, and the empty-artifact hints named error.details.stderr, which those errors do not carry. Each hint now names what its own error records: the paths for an empty artifact, both stdout and stderr for a failed tool run, and the cause for the Apple fallback. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 41e89ed commit 522e171

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎packages/platform-android/src/perf.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export async function captureAndroidHeapSnapshot(
126126
pid,
127127
path: outPath,
128128
remotePath,
129-
hint: 'Retry with a writable --out path. If the file is still empty, inspect adb pull output with --debug.',
129+
hint: 'Retry with a writable --out path. If the file is still empty, check that the device can write the heap dump at remotePath.',
130130
});
131131
}
132132

@@ -240,7 +240,7 @@ function resolveAndroidHeapDumpHint(stdout: string, stderr: string): string {
240240
if (text.includes('permission') || text.includes('denied')) {
241241
return 'The device denied heap dump access. Use a debug/profileable build or a device image that permits app heap dumping.';
242242
}
243-
return 'Reopen the app to refresh the process, then retry perf memory snapshot. If it still fails, rerun it with --json and read the adb am dumpheap output in error.details.stderr.';
243+
return 'Reopen the app to refresh the process, then retry perf memory snapshot. If it still fails, read the adb am dumpheap output in error.details.stdout and error.details.stderr (--json).';
244244
}
245245

246246
function parseAndroidMemInfoTopConsumers(stdout: string): AndroidMemoryConsumer[] | undefined {

‎packages/platform-apple/src/core/perf.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export async function captureAppleMemorySnapshot(
172172
appBundleId,
173173
pid: processInfo.pid,
174174
path: outPath,
175-
hint: 'Retry with a writable --out path. If the file is still empty, rerun it with --json and read the leaks output in error.details.stderr.',
175+
hint: 'Retry with a writable --out path. If the file is still empty, check free disk space at path.',
176176
});
177177
}
178178

@@ -252,7 +252,7 @@ function annotateAppleMemorySnapshotToolError(
252252
pid: processInfo.pid,
253253
processName: path.basename(readProcessCommandToken(processInfo.command)),
254254
path: outPath,
255-
hint: 'Retry perf memory snapshot. If it still fails, rerun it with --json and read the leaks output in error.details.stderr.',
255+
hint: 'Retry perf memory snapshot. If it still fails, the Cause line names the leaks failure.',
256256
},
257257
error,
258258
);
@@ -666,7 +666,7 @@ function resolveAppleMemorySnapshotHint(
666666
? 'Grant the agent terminal process permission to inspect this macOS app, then retry.'
667667
: 'Keep the simulator booted and app running; if inspection is denied, retry with a debug simulator build.';
668668
}
669-
return 'Keep the app process running and retry perf memory snapshot with --debug if the failure persists.';
669+
return 'Keep the app process running and retry perf memory snapshot. If it still fails, read the leaks output in error.details.stdout and error.details.stderr (--json).';
670670
}
671671

672672
function buildAppleMemoryPerfSample(args: {

0 commit comments

Comments
 (0)