oxc/tasks/benchmark/Cargo.toml
overlookmotel aef593fb50
parser(refactor): promise only one Source on a thread at a time (#2340)
Introduce invariant that only a single `lexer::Source` can exist on a thread at one time.

This is a preparatory step for #2341.

2 notes:

Restriction is only 1 x `ParserImpl` / `Lexer` / `Source` on 1 *thread* at a time, not globally. So this does not prevent parsing multiple files simultaneously on different threads.

Restriction does not apply to public type `Parser`, only `ParserImpl`. `ParserImpl`s are not created in created in `Parser::new`, but instead in `Parser::parse`, where they're created and then immediately consumed. So the end user is also free to create multiple `Parser` instances (if they want to for some reason) on the same thread.
2024-02-08 14:51:17 +08:00

65 lines
1.3 KiB
TOML

[package]
name = "oxc_benchmark"
version = "0.0.0"
publish = false
authors.workspace = true
description.workspace = true
edition.workspace = true
homepage.workspace = true
keywords.workspace = true
license.workspace = true
repository.workspace = true
[lints]
workspace = true
[lib]
test = false
bench = false
doctest = false
[[bench]]
name = "parser"
harness = false
[[bench]]
name = "transformer"
harness = false
[[bench]]
name = "semantic"
harness = false
[[bench]]
name = "linter"
harness = false
# Broken
# [[bench]]
# name = "prettier"
# harness = false
[[bench]]
name = "minifier"
harness = false
[[bench]]
name = "lexer"
harness = false
[dependencies]
oxc_allocator = { workspace = true }
oxc_linter = { workspace = true }
oxc_minifier = { workspace = true }
oxc_parser = { workspace = true, features = ["benchmarking"] }
oxc_prettier = { workspace = true }
oxc_semantic = { workspace = true }
oxc_span = { workspace = true }
oxc_tasks_common = { workspace = true }
oxc_transformer = { workspace = true }
criterion = { workspace = true }
codspeed-criterion-compat = { workspace = true, optional = true }
[features]
codspeed = ["codspeed-criterion-compat"]