steipete/rendimiento-app-nativa

Rendimiento de apps nativas: xctrace, Time Profiler, trazas, puntos calientes.

¿Qué es rendimiento-app-nativa?

Esta habilidad permite perfilar el rendimiento de aplicaciones nativas desde la línea de comandos usando `xctrace`, sin necesidad de abrir Instruments. Puedes grabar trazas de Time Profiler, extraer muestras de tiempo, simbolizar direcciones de memoria y clasificar los puntos calientes de la CPU. Está diseñada para desarrolladores de macOS/iOS que quieran identificar cuellos de botella en código nativo de forma rápida y automatizada. Incluye scripts auxiliares para registrar, extraer y analizar trazas, y maneja correctamente el ASLR usando la dirección de carga en tiempo de ejecución.

Compatible con~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/steipete/agent-scripts/tree/main/skills/native-app-performance

Installed? Explore more Investigación y análisis de datos skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Rendimiento de Apps Nativas (solo CLI)

Objetivo: grabar el Time Profiler mediante xctrace, extraer muestras, simbolizar y proponer puntos calientes sin abrir Instruments.

Inicio rápido (CLI)

  1. Grabar Time Profiler (adjuntar):
# Inicia la app tú mismo, luego adjunta
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --attach <pid>
  1. Grabar Time Profiler (lanzar):
xcrun xctrace record --template 'Time Profiler' --time-limit 90s --output /tmp/App.trace --launch -- /path/App.app/Contents/MacOS/App
  1. Extraer muestras de tiempo:
scripts/extract_time_samples.py --trace /tmp/App.trace --output /tmp/time-sample.xml
  1. Obtener la dirección de carga para simbolizar:
# Mientras la app está en ejecución
vmmap <pid> | rg -m1 "__TEXT" -n
  1. Simbolizar + clasificar puntos calientes:
scripts/top_hotspots.py --samples /tmp/time-sample.xml \
  --binary /path/App.app/Contents/MacOS/App \
  --load-address 0x100000000 --top 30

Notas de flujo de trabajo

  • Siempre confirma que estás perfilando el binario correcto (compilación local vs /Applications). Prefiere la ruta directa del binario para --launch.
  • Asegúrate de activar la ruta lenta durante la captura (abrir/cerrar menú, refrescar, etc.).
  • Si las pilas están vacías, captura por más tiempo o evita secciones inactivas.
  • xcrun xctrace help record y xcrun xctrace help export muestran las banderas correctas.

Scripts incluidos

  • scripts/record_time_profiler.sh: grabar mediante adjuntar o lanzar.
  • scripts/extract_time_samples.py: exportar XML de muestras de tiempo desde una traza.
  • scripts/top_hotspots.py: simbolizar y clasificar los frames principales de la app.

Problemas comunes

  • ASLR significa que debes usar la dirección de carga __TEXT en tiempo de ejecución de vmmap.
  • Si usas una nueva compilación, actualiza la ruta --binary; los símbolos deben coincidir con la traza.
  • Flujo solo CLI: no es necesario abrir Instruments si las pilas se simbolizan mediante atos.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

steipete/agent-transcript

GitHub PR/issue agent transcripts: redact, preview, and insert safely.

steipete/beeper

Beeper cache: contact hints, room lookup, WhatsApp/iMessage traces, FTS.

steipete/browser-use

Existing Chrome automation: Chrome plugin first, mcporter fallback.

steipete/clawsweeper-status

ClawSweeper status: URLs, workflow health, active workers, ops snapshot.

steipete/clickclack

ClickClack ops: chat app, Hetzner deploy, DNS/docs/app, Docker rollout.

steipete/cloudflare-registrar

Cloudflare Registrar: domain availability, prices, registration via mcporter.

steipete/codex-debugging

Codex debugging: codex-rs core/tui/exec/cli/app-server/config.

steipete/create-cli

CLI UX/spec: args, flags, help, output, errors, config, dry-run.

steipete/discord-clawd

Discord-backed OpenClaw agent/session relay; not archive search.

steipete/domain-dns-ops

DNS/domain ops: registrars, zones, redirects, DNS/HTTP verify, manager truth.

steipete/frontend-design

Frontend UI: pages, apps, components, polished non-generic design.

steipete/github-author-context

GitHub contributor context: identity, activity, trust, company/team signal.

steipete/github-cache-hygiene

GitHub quota/cache hygiene: gh, ghx, xcache, gitcrawl, mirrors, limits.

steipete/github-deep-review

GitHub deep review: bugs, PRs, best fix, stale-or-real, read code first.

steipete/github-project-triage

GitHub issue/PR triage: queues, CI, blockers, risk, proof, next actions.

steipete/hopper-debugger

Hopper debugging: macOS/iOS binaries, ObjC/Swift symbols, dyld, LLDB.

steipete/instruments-profiling

Instruments/xctrace profiling: macOS/iOS traces, binaries, args, exports.

steipete/mac-maintenance

Mac upkeep: brew update/upgrade, pull clean repos, empty Trash.

steipete/maintainer-orchestrator

Open-source maintainer orchestration: Codex app workers, work recovery, dependencies, vision, releases.

steipete/markdown-converter

Markdown conversion: PDF, Office, HTML, data, OCR, audio, ZIP, YouTube.

Skills relacionados