Skip to main content

wtf-perf

PyPI Release Date PyPI Downloads CI Python 3.10+ License: GPL v3 GitHub Discussions Installs Platform

Why TF is my Windows PC slow? Accounts for every point of CPU: processes, short-lived processes, interrupts and speed scaling

Task Manager can show 45% CPU while its biggest process reads 3%. wtf-perf answers the question that leaves- is something hiding CPU, or are many small things adding up? It samples every process (including the ones that start and exit in under a second), reads the system counters over the same window, and accounts for the headline point by point.

Installation

pip install wtf-perf        # once the first release is on PyPI

From source:

git clone https://github.com/DazzleTools/wtf-perf.git
cd wtf-perf
pip install -e ".[dev]"

Usage

wtf-perf                 # same as: wtf-perf cpu (10-second sample)
wtf-perf cpu -s 15       # sample 15 s and account for every point of the CPU headline
wtf-perf cpu --json      # the same report as JSON, for scripts
wtf-perf cpu --ai        # add an AI summary (claude by default; also codex, lmstudio, ollama, prompt-only)
wtf-perf cpu --providers # this platform's data sources, and whether each can run here
wtf-perf --help          # the tools and some examples
wtf-perf list            # the available tools
python -m wtf_perf --version

Read-only throughout, and no elevation needed. Through wtf-windows the same tool runs as wtf perf.

What the report shows

Every figure is in points: one point is 1% of the whole machine over the sampling window, the unit of Task Manager's headline.

  • The verdict -- one line answering the question: it adds up (dominated by one application, or many small consumers), or it does not add up, with the points left unexplained.
  • The ledger -- headline = busy time + speed-scaling uplift, then busy time = live processes (by size) + processes that exited during the window + interrupts/DPCs + unexplained. The uplift is real: Task Manager's figure scales busy time by how fast the busy cores ran, so it reads higher than the time actually spent.
  • Applications -- processes rolled up into families (an editor, an agent, a browser and all their helpers), because an application made of hundreds of small processes never ranks in Task Manager.
  • Short-lived processes -- how many started and exited during the window, and which images.
  • File operations -- read, write and other I/O operation rates per application.
  • Findings -- warnings for odd or hidden consumers: one process hogging, many small consumers, a family hidden behind small processes, heavy process churn, an inflated headline, interrupt or kernel-heavy load, metadata storms.

The output pages in three tiers (summary, evidence, detail). Press a key for the next tier, q or Esc to stop.

Options

Option What it does
-s, --seconds N sampling window (default 10)
--interval MS poll gap (default 100); shorter catches shorter-lived processes and costs more
--top N rows per table (default 12)
-t, --tier 0,1,2 which tiers to show (all for every tier)
-np, --no-page print the tiers without pausing
--json the full report as JSON
--platform NAME the provider set (auto, the detected platform, by default)
--providers list the platform's data sources and whether each can run here
--ai [BACKEND] add an AI summary; --ai-only shows only that, --ai-verbose streams it
--ai-detail names|full names (default) sends process names and figures; full adds the top processes' command lines
--ai-model NAME the model to ask for (required for ollama)
--ai-save keep --ai and --ai-detail as the defaults (in ~/.wtf-perf/config.json)

The AI summary

The AI summary sends process names and figures to the backend you choose -- never command lines unless you ask for them with --ai-detail full, and then with a warning when the backend runs off your machine. The agent CLIs (claude, codex) run with no tools and one turn; lmstudio and ollama run locally; prompt-only writes the prompt to a file and calls nothing. Without elevation, command lines of other users' and protected processes are reported as unavailable; everything else works the same.

Platforms

Windows is the supported platform and it's detailed. It reads the kernel's process table directly (no WMI, no PowerShell), plus the performance counters. The data sources sit behind a per-platform provider set; Linux and macOS have named stubs today, so on those systems wtf-perf cpu says which source is missing instead of sampling. What works where, provider by provider: Platform support. A Linux provider is tracked in #4.

Known limits

  • Processes shorter than the poll gap are never seen, so their CPU lands in the unexplained line. On a machine with heavy process churn (editor and agent hooks) that line can reach 3-4 points; measured, about three quarters of it is such processes. Recording the kernel's process-exit events would account for them: #3.
  • More than 64 logical processors (more than one processor group) are not handled yet.
  • The thresholds behind the findings were set on one machine; each finding prints its evidence so you can judge it.

wtf-perf is part of the wtf-windows family of diagnostics and is built on dazzlecmd-lib, so each drill-down is a tool under one command.

Development

Prerequisites:

  • Python 3.10+
  • Git

Setup:

git clone https://github.com/DazzleTools/wtf-perf.git
cd wtf-perf
python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
bash scripts/repokit-common/install-hooks.sh

Tests:

python -m pytest tests/ -v

Contributing

Contributions welcome! Please open an issue or submit a pull request.

See CONTRIBUTING.md for:

  • Development setup
  • Running the tests
  • Version management with sync-versions.py
  • Pull request checklist

Like the project?

"Buy Me A Coffee"

License

wtf-perf, Copyright (C) 2026 Dustin Darcy

Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later) -- see LICENSE.

Metadata

Release files for wtf-perf 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wtf-perf 0.2.1
File Size Uploaded Provenance Actions
wtf_perf-0.2.1.tar.gz 95.7 kB With provenance Details for wtf_perf-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wtf-perf 0.2.1
File Interpreter ABI Platform Actions
wtf_perf-0.2.1-py3-none-any.whl Python 3 none any Details for wtf_perf-0.2.1-py3-none-any.whl

Total release size: 185.4 kB

Release files / wtf_perf-0.2.1.tar.gz

Download URL wtf_perf-0.2.1.tar.gz
Size 95.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0f73b92eb0dae846212877898b2b38fac7e302f38c5aa350ce514715da3dc2f8
BLAKE2b-256 checksum
How to use checksums
8398b204c06307fa1e84dabd9c33441591b466f5d4062cc6b32542d813c6ea13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Release files / wtf_perf-0.2.1-py3-none-any.whl

Download URL wtf_perf-0.2.1-py3-none-any.whl
Size 89.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
553baf094cfe912127fefc600d0db65a42541e80869abbaa72e21f790f85643c
BLAKE2b-256 checksum
How to use checksums
b166c74ea979ee607b931b92fbb4d0d3df3bf7b9b30d2182e601a8fa35b864c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

Security for wtf-perf 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wtf_perf-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page