mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Merge #9999
9999: internal: use single env var to controll all benchmarks r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
dab6e9ff5b
1 changed files with 3 additions and 2 deletions
|
@ -11,7 +11,7 @@ use std::{
|
||||||
use ast::NameOwner;
|
use ast::NameOwner;
|
||||||
use expect_test::expect_file;
|
use expect_test::expect_file;
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
use test_utils::{bench, bench_fixture, project_root, skip_slow_tests};
|
use test_utils::{bench, bench_fixture, project_root};
|
||||||
|
|
||||||
use crate::{ast, fuzz, tokenize, AstNode, SourceFile, SyntaxError, TextRange, TextSize, Token};
|
use crate::{ast, fuzz, tokenize, AstNode, SourceFile, SyntaxError, TextRange, TextSize, Token};
|
||||||
|
|
||||||
|
@ -48,9 +48,10 @@ fn main() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn benchmark_parser() {
|
fn benchmark_parser() {
|
||||||
if skip_slow_tests() {
|
if std::env::var("RUN_SLOW_BENCHES").is_err() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = bench_fixture::glorious_old_parser();
|
let data = bench_fixture::glorious_old_parser();
|
||||||
let tree = {
|
let tree = {
|
||||||
let _b = bench("parsing");
|
let _b = bench("parsing");
|
||||||
|
|
Loading…
Reference in a new issue