microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
280b0da953f54bd2ea9e48c78f03518ef4e75bae

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

compiler/qsc/benches/library.rs

20lines · modecode

1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4allocator::assign_global!();
5
6use criterion::{criterion_group, criterion_main, Criterion};
7use qsc::{compile, TargetCapabilityFlags};
8use qsc_frontend::compile::PackageStore;
9
10pub fn library(c: &mut Criterion) {
11 c.bench_function("Core + Standard library compilation", |b| {
12 b.iter(|| {
13 let store = PackageStore::new(compile::core());
14 compile::std(&store, TargetCapabilityFlags::all())
15 });
16 });
17}
18
19criterion_group!(benches, library);
20criterion_main!(benches);
21