Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Perf Trace

ASecurity

Capture a dotnet-trace / dotnet-counters session against the live backend and parse it with perftools (allocparse/cpuparse/dbparse) to attribute WHO is responsible for what L2 observed. Use when you know load behaves a certain way (L2) and need to find the responsible code — allocation churn, on-CPU time, or DB command shape.

2 stars
0 votes
0 copies
0 views
Added 9/20/2026
toolsgoshellbashnodegitdatabasebackendperformance

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add VirtoCommerce/vc-mcp-testing-module --skill perf-trace --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Perf Trace?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Perf Trace
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/virtocommerce-perf-trace/badge)](https://www.skillsdirectory.com/skills/virtocommerce-perf-trace)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: perf-trace
description: Capture a dotnet-trace / dotnet-counters session against the live backend and parse it with perftools (allocparse/cpuparse/dbparse) to attribute WHO is responsible for what L2 observed. Use when you know load behaves a certain way (L2) and need to find the responsible code — allocation churn, on-CPU time, or DB command shape.
---

# perf-trace — L3 of the three-layer performance loop

The attribution layer of the loop (**L1 bench → L2 load → L3 diagnose**, see skill
`perf-loop` for the router and cross-layer discipline). L3 runs against the live backend
**while an L2 scenario drives traffic**, and answers WHY — which code is responsible for what L2
observed.

## Finding the backend pid

Resolve the app binary's pid, not the `dotnet run` wrapper carrying the same name — match
`perf.platformProcess` from `project-profile.json`:

```bash
pgrep -f "bin/[^ ]*/<perf.platformProcess>"
# or, cross-platform (also works on Windows/Git Bash, where pgrep is absent):
dotnet-counters ps | grep -F "<perf.platformProcess>"
```

## Capture → parse flow

1. Start load with the L2 harness (`perf-loadtest` skill) targeting `perf.backendUrl`.
2. Capture with `dotnet-trace collect`, using the profile the axis calls for:

   ```bash
   dotnet-trace collect -p <pid> --profile gc-verbose -o alloc.nettrace                 # allocation churn
   dotnet-trace collect -p <pid> --profile dotnet-sampled-thread-time -o cpu.nettrace    # on-CPU time
   dotnet-trace collect -p <pid> --profile database -o db.nettrace                       # DB command wall-time
   ```

3. Parse with the matching file-based app under `$pluginRoot/skills/perf-trace/perftools/`
   (`$pluginRoot` is this plugin's active install path — resolve it once per task via
   `claude plugin list --json`, see [`../../knowledge/plugin-root.md`](../../knowledge/plugin-root.md);
   it is NOT a shell variable and `$CLAUDE_PLUGIN_ROOT` does **not** expand in the Bash tool shell):

   ```bash
   dotnet run $pluginRoot/skills/perf-trace/perftools/allocparse.cs -- alloc.nettrace 25
   dotnet run $pluginRoot/skills/perf-trace/perftools/cpuparse.cs -- cpu.nettrace 25
   dotnet run $pluginRoot/skills/perf-trace/perftools/dbparse.cs -- db.nettrace
   ```

Full decision matrix (which tool for which question), gotchas, and why these parsers exist
instead of an off-the-shelf tool: `perftools/README.md`.

## Start here when the question is "which operation costs what"

Before reaching for `dotnet-trace` at all: if the question is *which GraphQL operation issues which
backend calls, and where its time goes*, the OTel spans Aspire already collects answer it with **no
profiler, no rebuild, and no in-process counters**. This is the cheapest first cut of L3 and it
routinely reorders the candidate list before any code is touched.

```bash
aspire otel spans backend --apphost "$AH" --follow --format Json --non-interactive > spans.json &
OP_TAG=1 ITERATIONS=6 <loadtests>/run.sh smoke     # OP_TAG labels each request ?op=<name>; 1 VU
kill %1
node $pluginRoot/skills/perf-trace/perftools/op_attrib.mjs spans.json --last
```

Requires **1 VU** (`smoke`): attribution is by time containment, so requests must not overlap — the
tool counts overlaps and refuses rather than emitting meaningless numbers. Details and the three
traps it avoids (no `traceId` grouping, union-not-sum time, no datastore double-count):
`perftools/README.md`.

Reach for `dotnet-trace` when this leaves a large **`in-proc`** share — time no downstream call
explains — since that is where allocation/CPU attribution is the only way forward.

## EventPipe is single-consumer — the gotcha that costs real time

`dotnet-counters` and `dotnet-trace` cannot both attach to the same pid at once. **Stop
`dotnet-counters` before starting `dotnet-trace`** on the same backend pid, or the trace fails to
attach. If the L2 harness's counters sidecar is running, disable it (its `NO_COUNTERS=1` knob)
before a trace capture.

## Role in the loop

L3 never runs standalone — it attributes what L2 (`perf-loadtest`) already showed. After fixing,
redeploy and repeat capture → parse with identical knobs, then re-verify with L1 if the change is
bench-visible.

Attribution

VirtoCommerceVirtoCommerce
View sourceMore from VirtoCommerce →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

ucoz-landing-skill

Playbook for creating and editing uCoz landing pages via MCP tools (`templates_tool`, `ftp_tool`, `modules_tool`). Use for tasks such as: "build a landing page", "update the homepage as a landing page", "create a promo page on the homepage", "add a lead form / menu / SEO to the homepage". Homepage: `page_list`, `page_get`; first publish — `page_update` with full `page_tmpl`; HTML edits after generation — `patch_template` (module_id=2, template_id=1), not `update_template`. Activate the mail f...

107 votes

Paperclip

Interact with the Paperclip control plane API for task coordination and governance. Use when checking assignments, updating issue status, posting comments, delegating work, managing routines, or calling Paperclip API endpoints.

805541 votes

Instantly Rdsthomas Mission Control

Instantly.ai cold email outreach API - manage campaigns, leads, accounts, and analytics. Use for cold email automation, lead management, campaign creation/monitoring, and email account warmup.

761 votes

Daw Music

Digital Audio Workstation usage, music composition, interactive music systems, and game audio implementation for immersive soundscapes.

761 votes

Caveman Compress

Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress memory file"

1023330 votes
View all in tools →