用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/Azure/azure-sdk-for-rust --skill create-perf-test命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | create-perf-test |
| description | Generate a new performance test |
| disable-model-invocation | true |
You will generate a new performance (perf) test under the sdk/{service-directory}/{crate-name}/perf directory as ${input:testName:perf_test_name}.rs where:
{service-directory} is the directory name under sdk for the current ${file} e.g., core.{crate-name} is the crate directory name under sdk/{service-directory} for the current ${file} e.g., azure_core.These instructions only need to be done once. If changes described are already present, do not make the changes again.
Under the {crate-name} directory, in Cargo.toml add the following section:
[[bench]]
name = "perf"
path = "perf/perf_tests.rs"
harness = false
Under the {crate-name} directory, add a perf/perf_tests.rs file that uses azure_core_test::perf::PerfRunner to register and run the crate's perf tests.
Under the {crate-name} directory, copy sdk/core/perf.yml and change only the following contents:
ServiceDirectory to match the {service-directory}.Under the {crate-name} directory, copy sdk/core/perf-tests.yml and change only the following contents:
Service to match the {service-directory}.Project to match the {crate-name}.PackageVersions to replace azure_core with the {crate-name}.For each new perf test:
In sdk/{service-directory}/{crate-name}/perf/${input:testName}.rs:
azure_core_test::perf::PerfTest.test_metadata() function returning PerfTestMetadata, including any required command-line options.PerfTest implementation.context.recording().credential() or an existing helper) instead of introducing a new authentication flow.recording.instrument_perf(&mut options.client_options)?.In sdk/{service-directory}/{crate-name}/perf/perf_tests.rs:
mod ${input:testName};.PerfRunner::new(...).In the {crate-name}/perf-tests.yml file:
Add a top-level Tests: property if it does not already exist.
Add the following YAML under the Tests: property as a separate YAML array object:
- Test: ${input:testName}
Class: ${input:testName}
Arguments:
- --sync
Match existing crate patterns for client construction, shared setup state, and environment variable names.