Skip to content

Commit b5ea1a7

Browse files
authored
Disable tsort_input_parsing_heavy for being too intermittent (#10109)
* Disable tsort_input_parsing_heavy for being too intermittent * also ignore generate_input_parsing_heavy Comment out the generate_input_parsing_heavy function for future use. * Document why it has been disabled
1 parent 98e0b31 commit b5ea1a7

1 file changed

Lines changed: 23 additions & 18 deletions

File tree

src/uu/tsort/benches/tsort_bench.rs

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -116,24 +116,6 @@ fn generate_wide_dag(num_nodes: usize) -> Vec<u8> {
116116
data
117117
}
118118

119-
/// Generate DAG data for input parsing stress tests
120-
fn generate_input_parsing_heavy(num_edges: usize) -> Vec<u8> {
121-
// Create a scenario with many edges but relatively few unique nodes
122-
// This stresses the input parsing and graph construction optimizations
123-
let num_unique_nodes = (num_edges as f64).sqrt() as usize;
124-
let mut data = Vec::new();
125-
126-
for i in 0..num_edges {
127-
let from = i % num_unique_nodes;
128-
let to = (i / num_unique_nodes) % num_unique_nodes;
129-
if from != to {
130-
data.extend_from_slice(format!("n{from} n{to}\n").as_bytes());
131-
}
132-
}
133-
134-
data
135-
}
136-
137119
/// Benchmark linear chain graphs of different sizes
138120
/// This tests the performance improvements mentioned in PR #8694
139121
#[divan::bench(args = [1_000_000])]
@@ -184,6 +166,28 @@ fn tsort_wide_dag(bencher: Bencher, num_nodes: usize) {
184166
});
185167
}
186168

169+
/*
170+
/// silent for now because too much variance
171+
172+
173+
/// Generate DAG data for input parsing stress tests
174+
fn generate_input_parsing_heavy(num_edges: usize) -> Vec<u8> {
175+
// Create a scenario with many edges but relatively few unique nodes
176+
// This stresses the input parsing and graph construction optimizations
177+
let num_unique_nodes = (num_edges as f64).sqrt() as usize;
178+
let mut data = Vec::new();
179+
180+
for i in 0..num_edges {
181+
let from = i % num_unique_nodes;
182+
let to = (i / num_unique_nodes) % num_unique_nodes;
183+
if from != to {
184+
data.extend_from_slice(format!("n{from} n{to}\n").as_bytes());
185+
}
186+
}
187+
188+
data
189+
}
190+
187191
/// Benchmark input parsing vs computation by using files with different edge densities
188192
#[divan::bench(args = [5_000])]
189193
fn tsort_input_parsing_heavy(bencher: Bencher, num_edges: usize) {
@@ -195,6 +199,7 @@ fn tsort_input_parsing_heavy(bencher: Bencher, num_edges: usize) {
195199
black_box(run_util_function(uumain, &[file_path_str]));
196200
});
197201
}
202+
*/
198203

199204
fn main() {
200205
divan::main();

0 commit comments

Comments
 (0)