8000 chore: update rust channel to support sftrace by hardfist · Pull Request #10539 · web-infra-dev/rspack · GitHub
[go: up one dir, main page]

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
chore: fix clippy
  • Loading branch information
hardfist committed Jun 1, 2025
commit e636e01296ae2fe980d3f882a56540654c30e37a
16 changes: 6 additions & 10 deletions tasks/benchmark/benches/groups/build_chunk_graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ function Navbar({ show }) {
export default Navbar";

ctx.push((
format!("/src/leaves/Component-{}.js", index)
.as_str()
.into(),
format!("/src/leaves/Component-{index}.js").as_str().into(),
code.to_string(),
));
}
Expand All @@ -66,20 +64,18 @@ fn gen_dynamic_module(

for i in index..index + 10 {
static_imports.push(format!(
"import Comp{} from '/src/leaves/Component-{}.js'",
i, i,
"import Comp{i} from '/src/leaves/Component-{i}.js'"
));
gen_static_leaf_module(i, ctx);
access.push(format!("Comp{}", i));
access.push(format!("Comp{i}"));
}

let depth = index / 10;
for random in random_table[depth].iter() {
reuse.push(format!(
"import Comp{} from '/src/leaves/Component-{}.js'",
random, random,
"import Comp{random} from '/src/leaves/Component-{random}.js'"
));
access.push(format!("Comp{}", random));
access.push(format!("Comp{random}"));
}

if gen_dynamic_module(num, index + 10, random_table, ctx) {
Expand All @@ -95,7 +91,7 @@ fn gen_dynamic_module(
depth
);

ctx.push((format!("/src/dynamic-{}.js", depth).as_str().into(), code));
ctx.push((format!("/src/dynamic-{depth}.js").as_str().into(), code));
true
}

Expand Down
Loading
0