Skip to content

PerfTest prototype #2687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

PerfTest prototype #2687

wants to merge 1 commit into from

Conversation

heaths
Copy link
Member

@heaths heaths commented Jun 9, 2025

We don't use built-in cargo bench benchmarks for various reasons including they are only supported in nightly. But we also want to allow criterion to work, so we can define our own test harness (our own main).

I think we do something similar to TestContext in azure_core_test and reuse as much code as possible to support live test resources i.e., requiring provisioned resources and a .env file. We define a proc macro to drive it, such that we just add it to an async function returning an azure_core::Result<()>. If the .env file is not found, we should exit without error: there's nothing to do.

We don't use built-in `cargo bench` benchmarks for various reasons including they are only supported in `nightly`. But we also want to allow `criterion` to work, so we can define our own test harness (our own main).

I think we do something similar to `TestContext` in `azure_core_test` and reuse as much code as possible to support live test resources i.e., requiring provisioned resources and a `.env` file. We define a proc macro to drive it, such that we just add it to an async function returning an `azure_core::Result<()>`. If the .env file is not found, we should exit without error: there's nothing to do.
@github-actions github-actions bot added the Azure.Core The azure_core crate label Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core The azure_core crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant