Skip to content

Commit 883d1f8

Browse files
authored
perf: Use release_max_level_info for tracing (#11027)
perf: Use info level for release profile
1 parent c0a9b29 commit 883d1f8

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/node_binding/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@ crate-type = ["cdylib"]
1414
debug_tool = ["rspack_binding_api/debug_tool"]
1515
plugin = ["rspack_binding_api/plugin"]
1616
sftrace-setup = ["rspack_binding_api/sftrace-setup"]
17+
info-level = ["tracing/release_max_level_info"]
1718

1819
[package.metadata.cargo-shear]
1920
# Adding napi-derive as a dependency to workaround an issue where `dts` will no longer work without it.
20-
ignored = ["napi-derive"]
21+
ignored = ["napi-derive", "tracing"]
2122

2223
[dependencies]
2324
rspack_binding_api = { workspace = true }
2425

2526
napi-derive = { workspace = true, features = ["compat-mode", "type-def"] }
27+
tracing = { workspace = true }
2628

2729
[build-dependencies]
2830
rspack_binding_build = { workspace = true }

crates/node_binding/scripts/build.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ async function build() {
6666
features.push("sftrace-setup");
6767
envs.RUSTFLAGS = "-Zinstrument-xray=always";
6868
}
69+
if(values.profile === "release"){
70+
features.push("info-level");
71+
}
6972
if (features.length) {
7073
args.push("--features " + features.join(","));
7174
}

0 commit comments

Comments
 (0)