mirror of https://github.com/astral-sh/ruff
[ci]: Fixup codspeed upgrade (#16790)
## Summary Benchmark isn't a required build step. That's why https://github.com/astral-sh/ruff/pull/16784/ got merged with the step failing. This PR fixes up the benchmarking step
This commit is contained in:
parent
c61d9c6bb7
commit
6f5a68608e
|
|
@ -1,4 +1,6 @@
|
||||||
use ruff_benchmark::criterion::{
|
use ruff_benchmark::criterion;
|
||||||
|
|
||||||
|
use criterion::{
|
||||||
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
|
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
|
||||||
};
|
};
|
||||||
use ruff_benchmark::{
|
use ruff_benchmark::{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
use ruff_benchmark::criterion::{
|
use ruff_benchmark::criterion;
|
||||||
|
|
||||||
|
use criterion::{
|
||||||
criterion_group, criterion_main, BenchmarkGroup, BenchmarkId, Criterion, Throughput,
|
criterion_group, criterion_main, BenchmarkGroup, BenchmarkId, Criterion, Throughput,
|
||||||
};
|
};
|
||||||
use ruff_benchmark::{
|
use ruff_benchmark::{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,6 @@
|
||||||
use ruff_benchmark::criterion::{
|
use ruff_benchmark::criterion;
|
||||||
|
|
||||||
|
use criterion::{
|
||||||
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
|
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
|
||||||
};
|
};
|
||||||
use ruff_benchmark::{
|
use ruff_benchmark::{
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,23 @@
|
||||||
#![allow(clippy::disallowed_names)]
|
#![allow(clippy::disallowed_names)]
|
||||||
|
use ruff_benchmark::criterion;
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
|
|
||||||
|
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
||||||
use rayon::ThreadPoolBuilder;
|
use rayon::ThreadPoolBuilder;
|
||||||
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
use red_knot_project::metadata::options::{EnvironmentOptions, Options};
|
use red_knot_project::metadata::options::{EnvironmentOptions, Options};
|
||||||
use red_knot_project::metadata::value::RangedValue;
|
use red_knot_project::metadata::value::RangedValue;
|
||||||
use red_knot_project::watch::{ChangeEvent, ChangedKind};
|
use red_knot_project::watch::{ChangeEvent, ChangedKind};
|
||||||
use red_knot_project::{Db, ProjectDatabase, ProjectMetadata};
|
use red_knot_project::{Db, ProjectDatabase, ProjectMetadata};
|
||||||
use ruff_benchmark::criterion::{criterion_group, criterion_main, BatchSize, Criterion};
|
|
||||||
use ruff_benchmark::TestFile;
|
use ruff_benchmark::TestFile;
|
||||||
use ruff_db::diagnostic::{DiagnosticId, OldDiagnosticTrait, Severity};
|
use ruff_db::diagnostic::{DiagnosticId, OldDiagnosticTrait, Severity};
|
||||||
use ruff_db::files::{system_path_to_file, File};
|
use ruff_db::files::{system_path_to_file, File};
|
||||||
use ruff_db::source::source_text;
|
use ruff_db::source::source_text;
|
||||||
use ruff_db::system::{MemoryFileSystem, SystemPath, SystemPathBuf, TestSystem};
|
use ruff_db::system::{MemoryFileSystem, SystemPath, SystemPathBuf, TestSystem};
|
||||||
use ruff_python_ast::PythonVersion;
|
use ruff_python_ast::PythonVersion;
|
||||||
use rustc_hash::FxHashSet;
|
|
||||||
|
|
||||||
struct Case {
|
struct Case {
|
||||||
db: ProjectDatabase,
|
db: ProjectDatabase,
|
||||||
|
|
|
||||||
|
|
@ -235,8 +235,8 @@ impl SubDiagnostic {
|
||||||
///
|
///
|
||||||
/// If a sub-diagnostic has not been marked as printed before being
|
/// If a sub-diagnostic has not been marked as printed before being
|
||||||
/// dropped, then its `Drop` implementation will panic in debug mode.
|
/// dropped, then its `Drop` implementation will panic in debug mode.
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
pub(crate) fn printed(&mut self) {
|
pub(crate) fn printed(&mut self) {
|
||||||
#[cfg(debug_assertions)]
|
|
||||||
{
|
{
|
||||||
self.inner.printed = true;
|
self.inner.printed = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue