mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
Add 'forceStop' NB CLI option in NB5 (port over from similar functionally in NB4 - PR# 675)
This commit is contained in:
@@ -72,6 +72,7 @@ public class BasicScriptBuffer implements ScriptBuffer {
|
||||
case run: // run activity
|
||||
case await: // await activity
|
||||
case stop: // stop activity
|
||||
case forceStop: // force stopping activity
|
||||
case waitMillis:
|
||||
|
||||
sb.append("scenario.").append(cmd).append("\n");
|
||||
|
||||
@@ -36,6 +36,7 @@ public class Cmd {
|
||||
run(),
|
||||
start(),
|
||||
stop(Arg.of("alias_name")),
|
||||
forceStop(Arg.of("alias_name")),
|
||||
script(Arg.of("script_path", s -> s)),
|
||||
await(Arg.of("alias_name")),
|
||||
waitMillis(Arg.of("millis_to_wait", Long::parseLong)),
|
||||
|
||||
@@ -35,6 +35,7 @@ public class NBCLICommandParser {
|
||||
private static final String RUN = "run";
|
||||
private static final String AWAIT = "await";
|
||||
private static final String STOP = "stop";
|
||||
private static final String FORCE_STOP = "forceStop";
|
||||
private static final String ACTIVITY = "activity";
|
||||
private static final String SCENARIO = "scenario";
|
||||
private static final String WAIT_MILLIS = "waitmillis";
|
||||
@@ -42,7 +43,7 @@ public class NBCLICommandParser {
|
||||
public static final Set<String> RESERVED_WORDS = new HashSet<>() {{
|
||||
addAll(
|
||||
Arrays.asList(
|
||||
FRAGMENT, SCRIPT, START, RUN, AWAIT, STOP, ACTIVITY, SCENARIO, WAIT_MILLIS
|
||||
FRAGMENT, SCRIPT, START, RUN, AWAIT, STOP, FORCE_STOP, ACTIVITY, SCENARIO, WAIT_MILLIS
|
||||
)
|
||||
);
|
||||
}};
|
||||
@@ -63,6 +64,7 @@ public class NBCLICommandParser {
|
||||
case RUN:
|
||||
case AWAIT:
|
||||
case STOP:
|
||||
case FORCE_STOP:
|
||||
case WAIT_MILLIS:
|
||||
cmd = Cmd.parseArg(arglist, canonicalizer);
|
||||
cmdList.add(cmd);
|
||||
|
||||
@@ -88,11 +88,16 @@ To start an activity and then wait for it to complete before continuing:
|
||||
run <pram>=<value> ...
|
||||
~~~
|
||||
|
||||
To stop an activity by its alias:
|
||||
To stop an activity by its alias while first waiting for a required thread (motor/slot) entering a specific SlotState:
|
||||
~~~
|
||||
stop <activity alias>
|
||||
~~~
|
||||
|
||||
To stop an activity by its alias, without first waiting for a required thread (motor/slot) entering a specific SlotState:
|
||||
~~~
|
||||
forceStop <activity alias>
|
||||
~~~
|
||||
|
||||
To wait for a particular activity that has been started to complete before continuing:
|
||||
~~~
|
||||
await <activity alias>
|
||||
|
||||
Reference in New Issue
Block a user