performance-investigation

Profile CLI applications and binary workloads to quantify on-CPU and off-CPU bottlenecks.

2|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/getspur/spur --skill performance-investigation-getspur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-investigation
Source: https://github.com/getspur/spur/tree/main/.spur/skills/performance-investigation
Command: npx skills add https://github.com/getspur/spur --skill performance-investigation-getspur

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill addresses the common pitfall of guessing the cause of performance issues by establishing a rigorous, data-driven loop to measure, localize, and quantify system bottlenecks before applying fixes.

Core Features & Use Cases

  • Baseline Measurement: Standardizes the use of system timing tools to capture wall, user, and system time.
  • Profiling Guidance: Provides actionable instructions for using tools like samply and cargo-flamegraph to visualize CPU and off-CPU activity.
  • Bottleneck Analysis: Helps distinguish between compute-bound tasks and off-CPU wait times caused by IO, locks, or subprocess churn.
  • Use Case: Use this skill when a CLI tool or binary is reported as slow to identify whether the delay is caused by inefficient code or external system overhead.

Quick Start

Run the performance investigation skill to profile the current binary and identify the primary bottleneck using the recommended sampling rate.

Frequently Asked Questions about performance-investigation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find what is causing latency in my CLI application?

To find latency causes, establish a systematic performance investigation loop to measure baseline wall, user, and system time. Then use profilers like samply or perf to generate flamegraphs that distinguish between compute-bound on-CPU costs and off-CPU wait times.

What's the best way to profile a slow binary workload?

The best way to profile a slow binary is to use a data-driven investigation loop that quantifies bottlenecks before applying fixes. Use profiling tools like samply or cargo-flamegraph to generate actionable flamegraphs that visualize CPU and off-CPU activity.

How does a flamegraph help with software optimization?

A flamegraph helps with software optimization by visualizing CPU and off-CPU activity to localize exact execution bottlenecks. It reveals whether delays stem from inefficient compute code or external system overhead like IO, locks, or subprocess churn.

Does this performance investigation approach work for off-CPU wait times?

Yes, performance investigation works for off-CPU wait times by distinguishing them from on-CPU compute costs. It identifies delays caused by external system overhead like IO operations, locks, or subprocess churn using targeted profiling metrics.

Do I need standard system timing utilities to debug performance issues?

Yes, you need standard system timing utilities to debug performance issues and capture baseline wall, user, and system time. Standardizing these measurements establishes a rigorous, data-driven loop to quantify bottlenecks before applying fixes.

Why does my CLI tool run slow even when CPU usage is low?

Your CLI tool runs slow with low CPU usage because of off-CPU wait times caused by IO, locks, or subprocess churn. Profiling with tools like samply distinguishes these external system overhead delays from actual compute-bound tasks.