prune-trace+DBCampaign: default to variant/benchmark %
If no --variant / --benchmark is specified, it's more reasonable to prune or run *all* variants/benchmarks (using the wildcard "%") instead of defaulting to "none"/"none". The trivial case with only one single variant/benchmark (which may still be "none"/"none" if import-trace's default is used) is still covered by this new default behavior. Change-Id: I0e9001137d5e052183dd74211e2edbcfab749528
This commit is contained in:
@ -29,9 +29,9 @@ bool DatabaseCampaign::run() {
|
||||
if (!cb_commandline_init()) return false;
|
||||
|
||||
CommandLine::option_handle VARIANT = cmd.addOption("v", "variant", Arg::Required,
|
||||
"-v/--variant \tVariant label (default: \"none\"; use % and _ as wildcard characters)");
|
||||
"-v/--variant \tVariant label (default: \"%\"; use % and _ as wildcard characters)");
|
||||
CommandLine::option_handle BENCHMARK = cmd.addOption("b", "benchmark", Arg::Required,
|
||||
"-b/--benchmark \tBenchmark label (default: \"none\"; use % and _ as wildcard characters)\n");
|
||||
"-b/--benchmark \tBenchmark label (default: \"%\"; use % and _ as wildcard characters)\n");
|
||||
CommandLine::option_handle PRUNER = cmd.addOption("p", "prune-method", Arg::Required,
|
||||
"-p/--prune-method \tWhich import method to use (default: basic)");
|
||||
|
||||
@ -50,12 +50,12 @@ bool DatabaseCampaign::run() {
|
||||
if (cmd[VARIANT].count() > 0)
|
||||
variant = std::string(cmd[VARIANT].first()->arg);
|
||||
else
|
||||
variant = "none";
|
||||
variant = "%";
|
||||
|
||||
if (cmd[BENCHMARK].count() > 0)
|
||||
benchmark = std::string(cmd[BENCHMARK].first()->arg);
|
||||
else
|
||||
benchmark = "none";
|
||||
benchmark = "%";
|
||||
|
||||
if (cmd[PRUNER].count() > 0)
|
||||
pruner = std::string(cmd[PRUNER].first()->arg);
|
||||
|
||||
@ -29,13 +29,13 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
CommandLine::option_handle VARIANT =
|
||||
cmd.addOption("v", "variant", Arg::Required,
|
||||
"-v/--variant \tVariant label (default: \"none\"; use % and _ as wildcard characters; may be used more than once)");
|
||||
"-v/--variant \tVariant label (default: \"%\"; use % and _ as wildcard characters; may be used more than once)");
|
||||
CommandLine::option_handle VARIANT_EXCLUDE =
|
||||
cmd.addOption("", "variant-exclude", Arg::Required,
|
||||
"--variant-exclude \tVariant to exclude (default: UNSET; use % and _ as wildcard characters; may be used more than once)");
|
||||
CommandLine::option_handle BENCHMARK =
|
||||
cmd.addOption("b", "benchmark", Arg::Required,
|
||||
"-b/--benchmark \tBenchmark label (default: \"none\"; use % and _ as wildcard characters; may be used more than once)");
|
||||
"-b/--benchmark \tBenchmark label (default: \"%\"; use % and _ as wildcard characters; may be used more than once)");
|
||||
CommandLine::option_handle BENCHMARK_EXCLUDE =
|
||||
cmd.addOption("", "benchmark-exclude", Arg::Required,
|
||||
"--benchmark-exclude \tBenchmark to exclude (default: UNSET; use % and _ as wildcard characters; may be used more than once)");
|
||||
@ -103,8 +103,8 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// fallback
|
||||
if (variants.size() == 0 && variants_exclude.size() == 0) {
|
||||
variants.push_back(std::string("none"));
|
||||
if (variants.size() == 0) {
|
||||
variants.push_back("%");
|
||||
}
|
||||
|
||||
if (cmd[BENCHMARK]) {
|
||||
@ -120,8 +120,8 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
|
||||
// fallback
|
||||
if (benchmarks.size() == 0 && benchmarks_exclude.size() == 0) {
|
||||
benchmarks.push_back(std::string("none"));
|
||||
if (benchmarks.size() == 0) {
|
||||
benchmarks.push_back("%");
|
||||
}
|
||||
|
||||
if (!pruner->init(db, variants, variants_exclude, benchmarks, benchmarks_exclude)) {
|
||||
|
||||
Reference in New Issue
Block a user