mirror of
https://github.com/oxc-project/oxc.git
synced 2026-11-04 10:29:58 +00:00
ci(benchmarks): fix and improve benchmarking commands (#9067)
* Fix `cargo benchmark` - previous it failed with an error. * Add `just benchmark-one` to run a single benchmark e.g. `just benchmark-one parser`. * Simplify `default` feature in `tasks/benchmark/Cargo.toml`.
This commit is contained in:
1 parent
bc64c9d13e
commit
d3ce88fa1c
3 files changed
+17
-15
No files matched your search
+1
-1
@@ -4,7 +4,7 @@ ck = "check --workspace --all-features --all-targets --locked"
|
||||
lint = "clippy --workspace --all-targets --all-features"
|
||||
codecov = "llvm-cov --workspace --ignore-filename-regex tasks"
|
||||
coverage = "run -p oxc_coverage --profile coverage --"
|
||||
benchmark = "run -p oxc_benchmark --release --"
|
||||
benchmark = "bench -p oxc_benchmark"
|
||||
minsize = "run -p oxc_minsize --profile coverage --"
|
||||
rule = "run -p rulegen"
|
||||
|
||||
|
||||
@@ -126,6 +126,12 @@ codecov:
|
||||
benchmark:
|
||||
cargo benchmark
|
||||
|
||||
# Run the benchmarks for a single component.
|
||||
# e.g. `just benchmark-one parser`.
|
||||
# See `tasks/benchmark`.
|
||||
benchmark-one *args:
|
||||
cargo benchmark --bench {{args}} --no-default-features --features {{args}}
|
||||
|
||||
# Automatically DRY up Cargo.toml manifests in a workspace.
|
||||
autoinherit:
|
||||
cargo binstall cargo-autoinherit
|
||||
|
||||
+10
-14
@@ -86,25 +86,21 @@ serde_json = { workspace = true, optional = true }
|
||||
|
||||
[features]
|
||||
default = [
|
||||
"dep:oxc_allocator",
|
||||
"dep:oxc_ast",
|
||||
"dep:oxc_codegen",
|
||||
"dep:oxc_isolated_declarations",
|
||||
"dep:oxc_linter",
|
||||
"dep:oxc_minifier",
|
||||
"dep:oxc_mangler",
|
||||
"dep:oxc_parser",
|
||||
"dep:oxc_prettier",
|
||||
"dep:oxc_semantic",
|
||||
"dep:oxc_span",
|
||||
"dep:oxc_tasks_common",
|
||||
"dep:oxc_transformer",
|
||||
"lexer",
|
||||
"parser",
|
||||
"transformer",
|
||||
"semantic",
|
||||
"minifier",
|
||||
"codegen",
|
||||
"linter",
|
||||
"prettier",
|
||||
"isolated_declarations",
|
||||
]
|
||||
codspeed = ["criterion2/codspeed"]
|
||||
codspeed_napi = ["criterion2/codspeed", "dep:serde", "dep:serde_json"]
|
||||
|
||||
# Features for running each benchmark separately with minimum dependencies that benchmark needs.
|
||||
# e.g. `cargo build --release -p oxc_benchmark --bench parser --no-default-features --features parser`
|
||||
# e.g. `cargo bench -p oxc_benchmark --bench parser --no-default-features --features parser`
|
||||
lexer = ["dep:oxc_allocator", "dep:oxc_ast", "dep:oxc_parser", "dep:oxc_span", "dep:oxc_tasks_common"]
|
||||
parser = ["dep:oxc_allocator", "dep:oxc_ast", "dep:oxc_parser", "dep:oxc_span", "dep:oxc_tasks_common"]
|
||||
transformer = [
|
||||
|
||||
Reference in new issue
Block a user