一键导入
test-performance
Use when measuring or reviewing performance, benchmarks, load tests, stress tests, spike tests, performance regressions, or optimization claims.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when measuring or reviewing performance, benchmarks, load tests, stress tests, spike tests, performance regressions, or optimization claims.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
DRN.Framework.EntityFramework - DrnContext, migrations, entity lifecycle tracking, Npgsql configuration, repositories, and named repository cancellation scopes. Keywords: drncontext, ef-core, migrations, database, postgresql, npgsql, repository-implementation, repository-cancellation, cancellation-scope, entity-tracking, dbcontext-configuration, prototype-mode, testcontainers
DRN.Framework.SharedKernel - Foundational domain primitives, exception hierarchy, repository contracts and cancellation semantics, pagination, JSON conventions, app constants, and shared extensions. Keywords: entity, aggregate-root, domain-event, repository, repository-cancellation, cancellation, pagination, exception, json, domain-modeling, source-known-id, entity-type, appconstants, path-extensions
DRN.Framework.Utils - Attribute-based dependency injection, IAppSettings configuration, app data roots, logging, scoped cancellation, validators, extension methods, and core utilities. Keywords: dependency-injection, di, service-registration, configuration, appsettings, appdata, logging, scoped-log, cancellation, cancellation-scope, validators, attributes, scoped, singleton, transient, config, extensions, http-client
Use when choosing which repository skills to load for a task, mapping work to skill families, finding related skills, or updating skill routing after skills change.
Agentic development standards - Silent Partner Protocol, context economy, development loop (discovery, planning, execution, verification), and anti-patterns for efficient autonomous development. Keywords: agentic, ai-agent, development-loop, context-economy, autonomous, discovery, planning, execution, verification, anti-patterns, silent-partner
Documentation standards - README structure, ROADMAP patterns, skill documentation format (YAML frontmatter), markdown conventions, security documentation, API docs, and best practices. Guidelines for creating and maintaining all project documentation. Keywords: documentation, readme, roadmap, markdown, documentation-standards, yaml-frontmatter, technical-writing, api-documentation, changelog
| name | test-performance |
| description | Use when measuring or reviewing performance, benchmarks, load tests, stress tests, spike tests, performance regressions, or optimization claims. |
| last-updated | "2026-06-12T00:00:00.000Z" |
| difficulty | intermediate |
| tokens | ~0.5K |
Performance testing with the repository's benchmark and load-test tooling.
Run benchmark commands only when the user explicitly allows build/test execution. Use the repository profile command when available; otherwise discover the benchmark project and set PERFORMANCE_PROJECT.
[MemoryDiagnoser]
public class MyBenchmark
{
private readonly List<int> _data = Enumerable.Range(0, 1000).ToList();
[Benchmark(Baseline = true)]
public int ForLoop()
{
var sum = 0;
for (var i = 0; i < _data.Count; i++) sum += _data[i];
return sum;
}
[Benchmark]
public int LinqSum() => _data.Sum();
}
dotnet run -c Release --project "$PERFORMANCE_PROJECT"
dotnet run -c Release --project "$PERFORMANCE_PROJECT" -- --filter-method Fully.Qualified.PerformanceTestClass.Run_Benchmarks
| Attribute | Purpose |
|---|---|
[Benchmark(Baseline = true)] | Baseline for comparison |
[MemoryDiagnoser] | Memory allocation metrics |
[GlobalSetup] / [IterationSetup] | Setup hooks |
[Params(1, 10, 100)] | Parameterized benchmarks |
Run load-test commands only when the user explicitly allows load-test execution. Discover script paths from the repository profile or the k6/ folder.
k6 run k6/scripts/api-load-test.js
k6 run --vus 50 --duration 1m k6/scripts/api-load-test.js
k6 run --out json=results.json k6/scripts/api-load-test.js
| Test Type | Purpose | Config |
|---|---|---|
| Load | Normal load | vus: 10, duration: '5m' |
| Stress | Beyond capacity | Ramp up VUs until failure |
| Spike | Sudden load | Quick ramp to high VUs |
| Soak | Extended duration | Low VUs, long duration |