Replace flatten_tree with extract_tree_levels

This commit is contained in:
Vitaliy Filippov
2023-05-18 17:44:00 +03:00
parent 57feb7f390
commit c1d470522c
4 changed files with 24 additions and 64 deletions
+5 -1
View File
@@ -108,7 +108,11 @@ async function run()
LPOptimizer.print_change_stats(res, false);
console.log('\n256 PGs, size=3, failure domain=rack');
res = await LPOptimizer.optimize_initial({ osd_tree: LPOptimizer.flatten_tree(crush_tree, {}, 1, 3), pg_size: 3, pg_count: 256 });
res = await LPOptimizer.optimize_initial({
osd_tree: LPOptimizer.extract_tree_levels({ level: -Infinity, children: crush_tree }, [ 1, 3 ], {}),
pg_size: 3,
pg_count: 256,
});
LPOptimizer.print_change_stats(res, false);
}