Skip to content

Latest commit

 

History

66 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

profiling-code

Collection of examples and links that uses different profiling tools to show memory usage and timings.

Shows how to use the profiler and what the output looks like. Includes only tools that are maintained.

Installing the agent skills safely

npx skills add rudolfolah/profiling-code --all installs every skill, including the advanced Python skills that document process attachment and privileged DTrace workflows. Security scanners therefore rate those skills more cautiously than skills that only explain an interactive profiler. The rating is a prompt-risk assessment, not a report of a vulnerable npm dependency; review the skill content and grant only the capabilities that fit your environment.

Prefer installing only the skills you need rather than using --all. To see the current CLI's selection syntax, run npx skills add rudolfolah/profiling-code --help, then select skills by name. The lower-risk starting set is:

  • browser-javascript-profiling
  • game-profiling
  • gpu-profiling
  • javascript-profiling
  • jvm-profiling
  • python-memory-profiling
  • react-profiling
  • systems-profiling

Add python-cpu-profiling only when external process sampling is needed, and add python-dtrace-profiling only on a controlled macOS host where privileged DTrace access is acceptable. python-profiling is an overview that links to both advanced workflows, so review those referenced skills before enabling it. Pin or inspect the repository revision before installing, re-run the assessments after updates, and never approve an elevation or process attach solely because a skill suggested it.

awesome-profiling: Great list of profiling tools, though includes some tools for Python that are no longer maintained.

⚙️ Tools and Techniques for Profiling Code

🧰 GPU Profiling Tools

📚 Learning Resources

📖 Books

📰 Articles

📺 Videos

🤖 Agent Skills

skills.sh

The repository bundles the following agent skills in .claude/skills/:

Skill directory Purpose Notable bundled reference files
browser-javascript-profiling Diagnose page-load cost, interaction latency, rendering jank, long tasks, and browser-retained objects with Chrome DevTools. —
game-profiling Profile Unity and Godot frame hitches, frame rate, allocations, memory, and rendering cost. —
gpu-profiling Select and use vendor and platform tools for GPU timelines, kernels, graphics captures, and counters. nvidia.md, amd.md, intel.md, android.md, metal.md
javascript-profiling Profile Node.js CPU use, allocations, retained heap, garbage collection, and event-loop latency. —
jvm-profiling Investigate JVM CPU, allocation, garbage collection, locks, safepoints, and memory with JFR, JMC, and related tools. —
python-cpu-profiling Compare and apply Python CPU and runtime profilers for call timing, sampling, and benchmarking. cprofile.md, py-spy.md, pyinstrument.md, pyperformance.md, yappi.md
python-dtrace-profiling Trace CPython function and source-line events with DTrace on macOS. —
python-memory-profiling Investigate Python allocations, object retention, heap growth, and process memory. —
python-profiling Choose an appropriate Python CPU, wall-clock, memory, or interpreter-event profiling workflow. —
react-profiling Measure React renders, commit duration, re-render frequency, and browser-trace correlations. —
systems-profiling Profile native programs with gprof, Linux perf, Tracy, Valgrind, and Apple Instruments. gprof.md, linux-perf.md, tracy.md, valgrind.md, apple-instruments.md

Install the skills from the public GitHub repository with the skills CLI:

npx skills add rudolfolah/profiling-code

To install only one skill, use the CLI's --skill selection option:

npx skills add rudolfolah/profiling-code --skill gpu-profiling

The published collection is listed on the profiling-code skills.sh registry page.

Contributors

Languages