-i mapfn --test test a range of inputs on the map
[--min-x x] [--max-x x] [--x x]
[--min-rule r] [--max-rule r] [--rule r]
- [--num-rep n]
+ [--min-rep n] [--max-rep n] [--num-rep n]
[--pool-id n] specifies pool id
[--batches b] split the CRUSH mapping into b > 1 rounds
[--weight|-w devno weight]
- $ crushtool -i "$TESTDIR/test-map-tries-vs-retries.crushmap" --test --show-mappings --show-statistics --weight 0 0 --weight 8 0
+ $ crushtool -i "$TESTDIR/test-map-tries-vs-retries.crushmap" --test --show-mappings --show-statistics --weight 0 0 --weight 8 0 --min-rep 1 --max-rep 10
rule 0 (replicated_ruleset), x = 0..1023, numrep = 1..10
CRUSH rule 0 x 0 [7]
CRUSH rule 0 x 1 [10]
cout << " -i mapfn --test test a range of inputs on the map\n";
cout << " [--min-x x] [--max-x x] [--x x]\n";
cout << " [--min-rule r] [--max-rule r] [--rule r]\n";
- cout << " [--num-rep n]\n";
+ cout << " [--min-rep n] [--max-rep n] [--num-rep n]\n";
cout << " [--pool-id n] specifies pool id\n";
cout << " [--batches b] split the CRUSH mapping into b > 1 rounds\n";
cout << " [--weight|-w devno weight]\n";
return EXIT_FAILURE;
}
tester.set_num_rep(x);
+ } else if (ceph_argparse_witharg(args, i, &x, err, "--min_rep", (char*)NULL)) {
+ if (!err.str().empty()) {
+ cerr << err.str() << std::endl;
+ return EXIT_FAILURE;
+ }
+ tester.set_min_rep(x);
+ } else if (ceph_argparse_witharg(args, i, &x, err, "--max_rep", (char*)NULL)) {
+ if (!err.str().empty()) {
+ cerr << err.str() << std::endl;
+ return EXIT_FAILURE;
+ }
+ tester.set_max_rep(x);
} else if (ceph_argparse_witharg(args, i, &x, err, "--max_x", (char*)NULL)) {
if (!err.str().empty()) {
cerr << err.str() << std::endl;