[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:
Micha Reiser 2025-03-17 09:14:22 +01:00 committed by GitHub
parent c61d9c6bb7
commit 6f5a68608e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 6 deletions

View file

@ -1,4 +1,6 @@
use ruff_benchmark::criterion::{
use ruff_benchmark::criterion;
use criterion::{
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
};
use ruff_benchmark::{

View file

@ -1,4 +1,6 @@
use ruff_benchmark::criterion::{
use ruff_benchmark::criterion;
use criterion::{
criterion_group, criterion_main, BenchmarkGroup, BenchmarkId, Criterion, Throughput,
};
use ruff_benchmark::{

View file

@ -1,4 +1,6 @@
use ruff_benchmark::criterion::{
use ruff_benchmark::criterion;
use criterion::{
criterion_group, criterion_main, measurement::WallTime, BenchmarkId, Criterion, Throughput,
};
use ruff_benchmark::{

View file

@ -1,21 +1,23 @@
#![allow(clippy::disallowed_names)]
use ruff_benchmark::criterion;
use std::borrow::Cow;
use std::ops::Range;
use criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use rayon::ThreadPoolBuilder;
use rustc_hash::FxHashSet;
use red_knot_project::metadata::options::{EnvironmentOptions, Options};
use red_knot_project::metadata::value::RangedValue;
use red_knot_project::watch::{ChangeEvent, ChangedKind};
use red_knot_project::{Db, ProjectDatabase, ProjectMetadata};
use ruff_benchmark::criterion::{criterion_group, criterion_main, BatchSize, Criterion};
use ruff_benchmark::TestFile;
use ruff_db::diagnostic::{DiagnosticId, OldDiagnosticTrait, Severity};
use ruff_db::files::{system_path_to_file, File};
use ruff_db::source::source_text;
use ruff_db::system::{MemoryFileSystem, SystemPath, SystemPathBuf, TestSystem};
use ruff_python_ast::PythonVersion;
use rustc_hash::FxHashSet;
struct Case {
db: ProjectDatabase,

View file

@ -235,8 +235,8 @@ impl SubDiagnostic {
///
/// If a sub-diagnostic has not been marked as printed before being
/// dropped, then its `Drop` implementation will panic in debug mode.
#[cfg(debug_assertions)]
pub(crate) fn printed(&mut self) {
#[cfg(debug_assertions)]
{
self.inner.printed = true;
}