azure/create-perf-test
Generate a new performance test
npx skills add https://github.com/Azure/azure-sdk-for-rust --skill create-perf-test
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.
{crate-name} directory, in Cargo.toml add the following section: [[bench]]
name = "perf"
path = "perf/perf_tests.rs"
harness = false
{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.{crate-name} directory, copy sdk/core/perf.yml and change _only_ the following contents:ServiceDirectory to match the {service-directory}.{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:
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)?.sdk/{service-directory}/{crate-name}/perf/perf_tests.rs:mod ${input:testName};.PerfRunner::new(...).{crate-name}/perf-tests.yml file:Tests: property if it does not already exist.Tests: property as a separate YAML array object: - Test: ${input:testName}
Class: ${input:testName}
Arguments:
- --sync
Take azure/create-perf-test from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.