
kr1sso/xtrace-skill
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
xtrace - 명령행 CPU macOS의 기술로 직업.
개요
MacOS Instruments의 유닉스 스타일 프로파일링 도구. 기록 추적, CPU 핫스팟을 분석, GPU 활용을 검사, 그리고 메모리 동작을 조사 - 터미널에서 모든, 파이프와 모든 composable. Apple의 계기는 강력하지만 GUI 전용입니다. xctrace는 존재하지만 사용하기 어렵습니다. "I have a binary" to "here is my hotspots" in one command. - - - 프로필에 대한 모든 명령을 미리 설정, 같은 시간 - - 기록 → 분석 → 하나의 파이프 라인에서 시각화 - - 스크립트에 대한 텍스트 요약, 스크립트에 대한 JSON, 인간을위한 SVG 불꽃, 깊은 분석을위한 speedscope - - - 단지 평균을 볼 수 없습니다, 불꽃, 신뢰 지표, 자동 단계 감지와 시간 동안 CPU 사용 변경 - - - - 다양한 텍스트 디퓨즈 및 빨간색 / 파란색 불꽃 - - 파이썬 stdlib 만. 제일 시각화를 위한 선택적인 inferno/speedscope. 1. (~/.local/bin) — xtrace, trace-record, trace-analyze.py, 등 2. — Pi, Cursor 및 Claude 부호는 모두 동일한 SKILL.md 체재를 이용합니다.
개요(AI 번역)
MacOS Instruments의 유닉스 스타일 프로파일링 도구. 기록 추적, CPU 핫스팟을 분석, GPU 활용을 검사, 그리고 메모리 동작을 조사 - 터미널에서 모든, 파이프와 모든 composable.
왜
Apple의 계기는 강력하지만 GUI 전용입니다. xctrace은 존재하지만 사용하기 어렵습니다. “I have a binary” to “here is my hotspots” in one command.
** xtrace ** 이 간격을 교량:
xtrace- [T2]]와 같은 프로파일에 어떤 명령을 접목- **모든 도구 파이프 함께 ** - 기록 → 분석 → 한 파이프에서 시각화 -Multiple output format — text summaries for terminals/LLMs, JSON for scripts, SVG Flamegraphs for humans, speedscope for deep analysis -Time-resolved Analysis — 평균을 볼 수 없습니다. Sparklines,자신감을 가진 시간 동안 CPU 사용량이 어떻게 변경되는지, 자동 단계 감지 -Before/after comparison - 차별 텍스트 디퓨즈 및 빨강/파랑 불꽃
- **Zero 외장 의존성 ** - Python stdlib 만. 제일 시각화를 위한 선택적인 inferno/speedscope.
설치
이 세 가지는:
- Symlinks 스크립트를 PATH (
~/.local/bin]) -xtrace],trace-record, `trace-analyze.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
xtrace — Command-line CPU/GPU/Memory Profiling for macOS
Unix-style profiling tools for macOS Instruments. Record traces, analyze CPU hotspots, inspect GPU utilization, and investigate memory behavior — all from the terminal, all composable with pipes.
# Profile any command. Just prefix it.
xtrace ./my_app --benchmark
# Pipe to a flamegraph
xtrace ./my_app | trace-speedscope -
# Build → profile → interactive analysis
cmake --build . && xtrace ./my_app | trace-speedscope -
Why
Apple’s Instruments is powerful but GUI-only. xctrace exists but is raw and hard to use. There’s no good way to go from “I have a binary” to “here are my hotspots” in one command.
xtrace bridges this gap:
xtrace— prefix any command to profile it, liketime- All tools pipe together — record → analyze → visualize in one pipeline
- Multiple output formats — text summaries for terminals/LLMs, JSON for scripts, SVG flamegraphs for humans, speedscope for deep analysis
- Time-resolved analysis — don’t just see averages, see how CPU usage changes over time with sparklines, confidence indicators, and automatic phase detection
- Before/after comparison — differential text diffs and red/blue flamegraphs
- Zero external dependencies for core analysis — Python stdlib only. Optional inferno/speedscope for best visualizations.
Install
git clone https://github.com/Kr1sso/xtrace-skill.git
cd xtrace-skill
./install.sh
This does three things:
- Symlinks scripts to PATH (
~/.local/bin) —xtrace,trace-record,trace-analyze.py, etc. - Installs as an AI agent skill — Pi, Cursor, and Claude Code all use the same
SKILL.mdformat. The installer symlinks this repo into each agent’s skills directory. - Prompts to install optional tools — inferno and speedscope for best visualizations.
Skills:
✓ Pi: ~/.pi/agent/skills/instruments/
✓ Cursor: ~/.cursor/skills/instruments/
✓ Claude Code: ~/.claude/skills/instruments/
All three agents read the same SKILL.md natively — one repo, one file, three symlinks.
Optional tools (recommended)
cargo install inferno # Best flamegraph SVGs (click-to-zoom, search, hover)
npm install -g speedscope # Interactive web UI (sandwich view, time-ordered, zoom)
Verify
./scripts/trace-check.sh # check environment
./test.sh # run end-to-end tests
Requirements
- macOS with Xcode or Command Line Tools (
xcode-select --install) - Python 3.8+ (ships with macOS)
- Apple Silicon or Intel (Processor Trace requires Apple Silicon + Developer Tools enabled)
Quick Start
# CPU profiling (default Time Profiler)
xtrace -d 10 ./my_app
# GPU profiling (Metal System Trace)
xtrace --gpu -d 10 ./my_app
# Enable Shader Timeline for real shader hotspot / callsite tooling
xtrace --gpu --shader-timeline -d 10 ./my_shader_app
추천 도구
다른 키워드를 입력하거나 필터를 제거해 보세요.
설치
npx skillfish add kr1sso/xtrace-skill