in sdk/core/azure_core/benches/benchmarks.rs [12:26]
fn url_parsing_benchmark(c: &mut Criterion) {
for num in PARAMS {
let mut url = String::new();
url.push_str("https://example.com/path/resource?param=value");
for i in 0..*num {
url.push_str(&format!("¶m{}=value{}", i, i));
}
c.bench_function(&format!("parse_basic_url_{}", num), |b| {
b.iter(|| {
black_box(Url::parse(&url).unwrap());
})
});
}
}