Skip to content

Commit

Permalink
diff_tree debug
Browse files Browse the repository at this point in the history
  • Loading branch information
akvlad committed Oct 18, 2024
1 parent 75795ae commit 421a9b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pyroscope/pprof-bin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,9 @@ fn synchronize_names(t1: &mut Tree, t2: &mut Tree) {
}

fn merge_nodes(t1: &mut Tree, t2: &mut Tree) {
let keys: Vec<u64> = t1.nodes.keys().cloned().collect();
let mut keys: HashSet<u64> = HashSet::new();
keys.extend(t1.nodes.keys());
keys.extend(t2.nodes.keys());

for key in keys {
let t1_children = t1.nodes.entry(key).or_insert_with(Vec::new);
Expand Down
2 changes: 1 addition & 1 deletion pyroscope/pprof-bin/src/utest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ mod tests {
for j in 0..exp_res.levels[i].values.len() / 7 {
exp_level.push(exp_res.names[exp_res.levels[i].values[j * 7 + 6] as usize].clone())
}
for j in 0..o_res.levels[i].values.len() / 6 {
for j in 0..o_res.levels[i].values.len() / 7 {
res_level.push(o_res.names[o_res.levels[i].values[j * 7 + 6] as usize].clone())
}
exp_level.sort();
Expand Down

0 comments on commit 421a9b2

Please sign in to comment.