better named scenario error for missing name, improved seq example

This commit is contained in:
Jonathan Shook 2020-03-24 18:10:08 -05:00
parent 278ebbd8ae
commit d877ee7628
2 changed files with 12 additions and 7 deletions
engine-cli/src/main/java/io/nosqlbench/engine/cli
nb/src/main/resources/activities/examples

View File

@ -49,7 +49,8 @@ public class NBCLIScenarioParser {
Scenarios scenarios = stmts.getDocScenarios();
List<String> cmds = scenarios.getNamedScenario(scenarioName);
if (cmds==null) {
throw new BasicError("Unable to find named scenario '" + scenarioName + "' in workload '" + workloadName);
throw new BasicError("Unable to find named scenario '" + scenarioName + "' in workload '" + workloadName
+", but you can pick from " + String.join(",",scenarios.getScenarioNames()));
}
// This will hold the command to be prepended to the main arglist

View File

@ -1,10 +1,14 @@
# eb run type=stdout yaml=examples/sequences cycles=20 seq=concat
# eb sequences concat
# yields ABBCCCDDDDABBCCCDDDD
# eb run type=stdout yaml=examples/sequences cycles=20 seq=interval
# yeilds ABCDDCBDCDABCDDCBDCD
# eb run type=stdout yaml=examples/sequences cycles=20 seq=bucket
# yeilds ABCDBCDCDDABCDBCDCDD
# eb run driver=stdout workload=examples/sequences cycles=20 seq=interval
# yields ABCDDCBDCDABCDDCBDCD
# eb run driver=stdout workload=examples/sequences cycles=20 seq=bucket
# yields ABCDBCDCDDABCDBCDCDD
scenarios:
concat: driver===stdout seq===concat
bucket: driver===stdout seq===bucket
interval: driver===stdout seq===interval
statements:
- A1: "|"
ratio: 1
@ -13,4 +17,4 @@ statements:
- C3: "="
ratio: 3
- D4: ":"
ratio: 4
ratio: 4