ruff/crates/ruff_benchmark/benches
Alex Waygood 44f2f77748
[ty] Add a `DateType` benchmark (#19148)
## Summary

The [`DateType`](https://github.com/glyph/DateType) library has some
very large protocols in it. Currently we type-check it quite quickly,
but the current version of https://github.com/astral-sh/ruff/pull/18659
makes our execution time on this library pathologically slow. That PR
doesn't seem to have a big impact on any of our current benchmarks,
however, so it seems we have some missing coverage in this area; I
therefore propose that we add `DateType` as a benchmark.

Currently the benchmark runs pretty quickly (about half the runtime of
attrs, which is our fastest real-world benchmark currently), and the
library has 0 third-party dependencies, so the benchmark is quick to
setup.

## Test Plan

`cargo bench -p ruff_benchmark --bench=ty`
2025-07-04 21:11:47 +01:00
..
formatter.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
lexer.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
linter.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
parser.rs Switch to Rust 2024 edition (#18129) 2025-05-16 13:25:28 +02:00
ty.rs [ty] Add a `DateType` benchmark (#19148) 2025-07-04 21:11:47 +01:00
ty_walltime.rs [ty] Temporarily disable the multithreaded pydantic benchmark (#19119) 2025-07-03 14:34:52 +02:00