Skip to content

Commit

Permalink
Made plugin check more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
alendit committed Dec 12, 2012
1 parent 6d681e7 commit c18fdf4
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/com/oltpbenchmark/DBWorkload.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,12 @@ public static void main(String[] args) throws Exception {
// ----------------------------------------------------------------

String pluginTest = "";
if (pluginList.length > 1) {
pluginTest = "[@bench='" + plugin + "']";

if (pluginList.length == 1) {
pluginTest = "[@bench='" + plugin + "' or not(@bench)]";
// pluginTest = "[not(@bench)]";
} else {
pluginTest = "[@bench='" + plugin + "']";
}

WorkloadConfiguration wrkld = new WorkloadConfiguration();
Expand Down Expand Up @@ -195,17 +199,14 @@ public static void main(String[] args) throws Exception {
LOG.fatal("You cannot use less than 1 TPS in a Phase of your expeirment. Use <disabled> option.");
System.exit(-1);
}
if (pluginTest.length() > 1)
// use a workaround if there multiple workloads or single
// attributed workload
if (pluginList.length > 1 || work.containsKey("weights[@bench]")) {
weight_strings = get_weights(plugin, work);
else {
weight_strings = work.getList("weights[not(@bench)]");
}
int rate;
if (work.containsKey("/rate" + pluginTest)) {
rate = work.getInt("/rate" + pluginTest);
} else {
rate = work.getInt("/rate");
weight_strings = work.getList("weights" + pluginTest);
}
int rate = work.getInt("/rate");
boolean rateLimited;
rateLimited = work.getBoolean("rateLimited[not(@bench)]", true);
rateLimited = work.getBoolean("ratelimited" + pluginTest, rateLimited);
Expand Down

0 comments on commit c18fdf4

Please sign in to comment.