From f8cf4eacb8b07b6ba85993d447ed5879002dae8b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Feb 2026 14:06:03 +0000 Subject: [PATCH] Fix perfetto exiting after fixed TTL by removing timeout and adding --no-guardrails Replace the fixed `-t 300s` duration with `--no-guardrails` so perfetto runs for the entire test session instead of exiting after a fixed timeout. The trace is stopped cleanly via SIGTERM when `./stop-recording` is called. Also increase the trace pull timeout from 30s to 120s to handle larger trace files from longer sessions. https://claude.ai/code/session_01Tf1TH2MAbGHG6XmEvMus5L --- .claude/skills/start-recording.md | 4 ++-- stop-recording | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.claude/skills/start-recording.md b/.claude/skills/start-recording.md index 6f641dd..2b148c6 100644 --- a/.claude/skills/start-recording.md +++ b/.claude/skills/start-recording.md @@ -69,7 +69,7 @@ Replace `` with the package name from the `am start` component (the part be If `--trace` was used, after launching the app (and after the gfxinfo reset if `--perf` was also used), start the Perfetto trace in the background: ```bash -./android-qa shell perfetto -o /data/misc/perfetto-traces/trace.perfetto-trace -t 300s -d gfx view input am wm dalvik sched freq +./android-qa shell perfetto -o /data/misc/perfetto-traces/trace.perfetto-trace --no-guardrails -d gfx view input am wm dalvik sched freq ``` -The `-d` flag detaches immediately. The command is recorded in the session. The trace runs until `./stop-recording` stops it cleanly. +The `-d` flag detaches immediately and `--no-guardrails` disables duration and size limits so the trace runs for the entire test session. The command is recorded in the session. The trace runs until `./stop-recording` stops it cleanly via SIGTERM. diff --git a/stop-recording b/stop-recording index dd454c8..99d6959 100755 --- a/stop-recording +++ b/stop-recording @@ -243,7 +243,7 @@ def capture_perfetto_trace(lock_data, session_dir): try: result = subprocess.run( adb_base + ["pull", PERFETTO_TRACE_DEVICE_PATH, local_trace_path], - capture_output=True, text=True, timeout=30, + capture_output=True, text=True, timeout=120, ) if result.returncode != 0: print("Warning: failed to pull Perfetto trace: %s" % result.stderr.strip(), file=sys.stderr)