用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/g-zenr/relay-api --skill load-test命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | load-test |
| description | Write performance and load tests to validate throughput and thread safety (Priya Sharma's workflow) |
| disable-model-invocation | true |
Write performance/load tests for: $ARGUMENTS
// Concurrency test — verify thread-safe access under load
TestConcurrency {
test_concurrent_state_changes_no_race_condition(client) {
// Submit 50 concurrent state-changing requests using a thread pool
pool = new ThreadPool(max_workers: 10)
futures = []
for i in range(50) {
futures.append(pool.submit(make_state_change_request, client, i))
}
results = [f.result() for f in futures]
// All requests should succeed (no 500s from race conditions)
for resp in results {
assert resp.status == 200
}
// Final state should be consistent
}
}
Verify the system handles rapid state changes without corruption. After rapid cycling, final state should be deterministic and consistent.
// Latency test — verify endpoints respond within acceptable time
TestLatency {
test_health_endpoint_under_200ms(client) {
start = high_resolution_timer() // see stack concepts
resp = client.GET("<health endpoint path>")
elapsed_ms = (high_resolution_timer() - start) * 1000
assert resp.status == 200
assert elapsed_ms < 200, "Health took {elapsed_ms}ms (limit: 200ms)"
}
}
Place load tests in the performance test file (see test file mapping in project config).
Run the test command (see project config) — full suite still passes.