mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-23 15:40:44 -06:00
clarify parameter names
This commit is contained in:
parent
add366a73b
commit
76ab3672ac
@ -39,9 +39,9 @@ public class NBJavaCommandLoader {
|
||||
}
|
||||
}
|
||||
|
||||
public static NBInvokableCommand init(String cmdSelector, NBComponent parent, String cmdAlias, String ctxName) {
|
||||
public static NBInvokableCommand init(String cmdSelector, NBComponent parent, String stepName, String ctxName) {
|
||||
NBCommandInfo cmdInfo = getSelector(cmdSelector).getOne();
|
||||
NBInvokableCommand command = cmdInfo.create(parent, cmdAlias, ctxName);
|
||||
NBInvokableCommand command = cmdInfo.create(parent, cmdSelector, ctxName);
|
||||
return command;
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ import java.util.Optional;
|
||||
@Service(value = NBInvokableResolver.class, selector = "autojs")
|
||||
public class NBAutoScriptResolver implements NBInvokableResolver {
|
||||
@Override
|
||||
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String phaseName) {
|
||||
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String stepname) {
|
||||
|
||||
Optional<Content<?>> scriptfile = NBIO.local()
|
||||
.searchPrefixes("scripts/auto")
|
||||
@ -47,7 +47,7 @@ public class NBAutoScriptResolver implements NBInvokableResolver {
|
||||
Map<String, CmdArg> newArgs = new LinkedHashMap<>(cmd.getArgs());
|
||||
newArgs.put("path",new CmdArg(new CmdParam("name",s->s,false),"=",pathOf.toString()));
|
||||
Cmd reformattedCmd = new Cmd("script", newArgs);
|
||||
return new NBScriptedCommand(parent, phaseName, cmd.getTargetContext()).add(reformattedCmd);
|
||||
return new NBScriptedCommand(parent, stepname, cmd.getTargetContext()).add(reformattedCmd);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
@ -25,10 +25,10 @@ import io.nosqlbench.nb.annotations.Service;
|
||||
@Service(value = NBInvokableResolver.class, selector = "js")
|
||||
public class NBScriptCommandResolver implements NBInvokableResolver {
|
||||
@Override
|
||||
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String phaseName) {
|
||||
public NBInvokableCommand resolve(Cmd cmd, NBBufferedContainer parent, String stepname) {
|
||||
return switch (cmd.getCmdType()) {
|
||||
case fragment, script->
|
||||
new NBScriptedCommand(parent, phaseName, cmd.getTargetContext()).add(cmd);
|
||||
new NBScriptedCommand(parent, stepname, cmd.getTargetContext()).add(cmd);
|
||||
// case fragment ->
|
||||
// new NBScriptedCommand(parent, phaseName, cmd.getTargetContext()).addScriptText(cmd.getArgValue("fragment"));
|
||||
// case script ->
|
||||
|
Loading…
Reference in New Issue
Block a user