rename parameter to use driver over type

This commit is contained in:
Jonathan Shook 2020-03-24 19:12:06 -05:00
parent 256116a570
commit 3f750d4704
35 changed files with 110 additions and 100 deletions

View File

@ -1,13 +1,13 @@
# nb -v run type=cql yaml=cql-iot tags=phase:schema host=dsehost
# nb -v run driver=cql yaml=cql-iot tags=phase:schema host=dsehost
scenarios:
default:
- run type=cql yaml=cql-iot-dse tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot-dse tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot-dse tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot-dse tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot-dse tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot-dse tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
stdout:
- run type=cql yaml=cql-iot-dse tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot-dse tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot-dse tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot-dse tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot-dse tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot-dse tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
bindings:
machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID
sensor_name: HashedLineToString('data/variable_words.txt')

View File

@ -1,13 +1,13 @@
# nb -v run type=cql yaml=cql-iot tags=phase:schema host=dsehost
# nb -v run driver=cql yaml=cql-iot tags=phase:schema host=dsehost
scenarios:
default:
- run type=cql yaml=cql-iot tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
stdout:
- run type=cql yaml=cql-iot tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-iot tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-iot tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
bindings:
machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID
sensor_name: HashedLineToString('data/variable_words.txt')

View File

@ -1,13 +1,13 @@
# nb -v run type=cql yaml=cql-keyvalue tags=phase:schema host=dsehost
# nb -v run driver=cql yaml=cql-keyvalue tags=phase:schema host=dsehost
scenarios:
default:
- run type=cql yaml=cql-keyvalue tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-keyvalue tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-keyvalue tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-keyvalue tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-keyvalue tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-keyvalue tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
stdout:
- run type=cql yaml=cql-keyvalue tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-keyvalue tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-keyvalue tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-keyvalue tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-keyvalue tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-keyvalue tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
bindings:
seq_key: Mod(<<keycount:1000000000>>); ToString() -> String
seq_value: Hash(); Mod(<<valuecount:1000000000>>); ToString() -> String

View File

@ -1,13 +1,13 @@
# nb -v run type=cql yaml=cql-tabular tags=phase:schema host=dsehost
# nb -v run driver=cql yaml=cql-tabular tags=phase:schema host=dsehost
scenarios:
default:
- run type=cql yaml=cql-tabular tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-tabular tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-tabular tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-tabular tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-tabular tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-tabular tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
stdout:
- run type=cql yaml=cql-tabular tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-tabular tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run type=cql yaml=cql-tabular tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-tabular tags=phase:schema hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-tabular tags=phase:rampup cycles=TEMPLATE(rampup-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
- run driver=cql yaml=cql-tabular tags=phase:main cycles=TEMPLATE(main-cycles,10000000) hosts=TEMPLATE(hosts,localhost)
bindings:
# for ramp-up and verify
part_layout: Div(<<partsize:1000000>>); ToString() -> String

View File

@ -1,5 +1,5 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/date.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/date.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)

View File

@ -1,5 +1,5 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/double.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/double.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)

View File

@ -1,6 +1,6 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/expr.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/expr.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)

View File

@ -1,5 +1,5 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/timestamp.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/timestamp.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)

View File

@ -1,5 +1,5 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/text.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/text.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)
@ -62,7 +62,7 @@ bindings:
# Example output:
# $ ebdse run type=stdout yaml=example-bindings format=readout cycles=10
# $ ebdse run driver=stdout yaml=example-bindings format=readout cycles=10
# phone : 241-478-6787
# phone : 784-482-7668
# phone : 804-068-5502

View File

@ -1,5 +1,5 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/timestamp.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/timestamp.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)

View File

@ -1,5 +1,5 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/timeuuid.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/timeuuid.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)

View File

@ -1,5 +1,5 @@
# You can run this file with this command line to see the values printed to stdout:
# ./ebdse run type=stdout yaml=bindings/uuid.yaml cycles=10
# ./ebdse run driver=stdout yaml=bindings/uuid.yaml cycles=10
# This file demonstrates different types of timestamp recipes
# that you can use with virtdata. (The bindings used in ebdse)

View File

@ -10,7 +10,7 @@ public class CqlActionTest {
@Test(enabled = false)
public void testCqlAction() {
ActivityDef ad = ActivityDef.parseActivityDef("type=ebdrivers;alias=foo;yaml=write-telemetry.yaml;");
ActivityDef ad = ActivityDef.parseActivityDef("driver=ebdrivers;alias=foo;yaml=write-telemetry.yaml;");
CqlActivity cac = new CqlActivity(ad);
CqlAction cq = new CqlAction(ad, 0, cac);
cq.init();
@ -18,4 +18,4 @@ public class CqlActionTest {
}
}
}

View File

@ -26,7 +26,7 @@ public class DiagActivityTypeTest {
public void testDiagActivity() {
DiagActivityType da = new DiagActivityType();
da.getName();
ActivityDef ad = ActivityDef.parseActivityDef("type=diag;");
ActivityDef ad = ActivityDef.parseActivityDef("driver=diag;");
DiagActivity a = da.getActivity(ad);
a.initActivity();
@ -35,4 +35,4 @@ public class DiagActivityTypeTest {
((SyncAction)action).runCycle(1L);
}
}
}

View File

@ -14,7 +14,7 @@ public class HttpActivityTypeTest {
String atname = httpAt.getName();
assertThat(atname.equals("http"));
ActivityDef ad = ActivityDef.parseActivityDef("type=http; yaml=http-google.yaml; host=google.com; port=80; cycles=1;");
ActivityDef ad = ActivityDef.parseActivityDef("driver=http; yaml=http-google.yaml; host=google.com; port=80; cycles=1;");
HttpActivity httpActivity = httpAt.getActivity(ad);
httpActivity.initActivity();
ActionDispenser actionDispenser = httpAt.getActionDispenser(httpActivity);

View File

@ -33,7 +33,7 @@ public class StdoutActivityTypeTest {
StdoutActivityType stdoutAt = new StdoutActivityType();
String atname = stdoutAt.getName();
assertThat(atname.equals("stdout"));
ActivityDef ad = ActivityDef.parseActivityDef("type=stdout; yaml=stdout-test;");
ActivityDef ad = ActivityDef.parseActivityDef("driver=stdout; yaml=stdout-test;");
StdoutActivity stdoutActivity = stdoutAt.getActivity(ad);
ActionDispenser actionDispenser = stdoutAt.getActionDispenser(stdoutActivity);
Action action = actionDispenser.getAction(1);

View File

@ -7,12 +7,12 @@ allow for the generation of data via a tcp client or server.
Run a stdout activity named 'stdout-test', with definitions from activities/stdout-test.yaml
~~~
... type=tcpclient yaml=stdout-test
... driver=tcpclient yaml=stdout-test
~~~
Run a stdout activity named 'stdout-test', with definitions from activities/stdout-test.yaml
~~~
... type=tcpserver yaml=stdout-test
... driver=tcpserver yaml=stdout-test
~~~
## ActivityType Parameters

View File

@ -76,7 +76,7 @@ statement template from the provided bindings if needed, so this is valid:
delta: WeightedStrings('one:1;six:6;three:3;')
# EOF (control-D in your terminal)
[test]$ ./eb run type=stdout yaml=stdout-test cycles=10
[test]$ ./eb run driver=stdout yaml=stdout-test cycles=10
0,zero,00A_pro,six
1,one,00B_pro,six
2,two,00C_pro,three
@ -109,7 +109,7 @@ bindings:
delta: WeightedStrings('one:1;six:6;three:3;')
# EOF (control-D in your terminal)
[test]$ ./eb run type=stdout yaml=stdout-test cycles=10
[test]$ ./eb run driver=stdout yaml=stdout-test cycles=10
This is a statement, and the file format doesn't
know how statements will be used!
submit job 1 on queue one with options 00B_pro;
@ -201,39 +201,39 @@ statements:
# EOF (control-D in your terminal)
# no tag filter matches any
[test]$ ./eb run type=stdout yaml=stdout-test
[test]$ ./eb run driver=stdout yaml=stdout-test
I'm alive!
# tag name assertion matches
[test]$ ./eb run type=stdout yaml=stdout-test tags=name
[test]$ ./eb run driver=stdout yaml=stdout-test tags=name
I'm alive!
# tag name assertion does not match
[test]$ ./eb run type=stdout yaml=stdout-test tags=name2
[test]$ ./eb run driver=stdout yaml=stdout-test tags=name2
02:25:28.158 [scenarios:001] ERROR i.e.activities.stdout.StdoutActivity - Unable to create a stdout statement if you have no active statements or bindings configured.
# tag value assertion does not match
[test]$ ./eb run type=stdout yaml=stdout-test tags=name:bravo
[test]$ ./eb run driver=stdout yaml=stdout-test tags=name:bravo
02:25:42.584 [scenarios:001] ERROR i.e.activities.stdout.StdoutActivity - Unable to create a stdout statement if you have no active statements or bindings configured.
# tag value assertion matches
[test]$ ./eb run type=stdout yaml=stdout-test tags=name:foxtrot
[test]$ ./eb run driver=stdout yaml=stdout-test tags=name:foxtrot
I'm alive!
# tag pattern assertion matches
[test]$ ./eb run type=stdout yaml=stdout-test tags=name:'fox.*'
[test]$ ./eb run driver=stdout yaml=stdout-test tags=name:'fox.*'
I'm alive!
# tag pattern assertion does not match
[test]$ ./eb run type=stdout yaml=stdout-test tags=name:'tango.*'
[test]$ ./eb run driver=stdout yaml=stdout-test tags=name:'tango.*'
02:26:05.149 [scenarios:001] ERROR i.e.activities.stdout.StdoutActivity - Unable to create a stdout statement if you have no active statements or bindings configured.
# compound tag predicate matches every assertion
[test]$ ./eb run type=stdout yaml=stdout-test tags='name=fox.*',unit=bravo
[test]$ ./eb run driver=stdout yaml=stdout-test tags='name=fox.*',unit=bravo
I'm alive!
# compound tag predicate does not fully match
[test]$ ./eb run type=stdout yaml=stdout-test tags='name=fox.*',unit=delta
[test]$ ./eb run driver=stdout yaml=stdout-test tags='name=fox.*',unit=delta
11:02:53.490 [scenarios:001] ERROR i.e.activities.stdout.StdoutActivity - Unable to create a stdout statement if you have no active statements or bindings configured.
@ -267,7 +267,7 @@ blocks:
beta: Combinations('b;l;o;c;k;2;-;COMBINATIONS;')
# EOF (control-D in your terminal)
[test]$ ./eb run type=stdout yaml=stdout-test cycles=10
[test]$ ./eb run driver=stdout yaml=stdout-test cycles=10
0,block1-C
1,block2-O
2,block1-M
@ -462,7 +462,7 @@ bindings:
statements:
- "doc2.number {numname}\n"
# EOF (control-D in your terminal)
[test]$ ./eb run type=stdout yaml=stdout-test cycles=10
[test]$ ./eb run driver=stdout yaml=stdout-test cycles=10
doc1.form1 doc1.1
doc1.form2 doc1.2
doc2.number two
@ -497,10 +497,10 @@ statements:
- "<<linetoprint:MISSING>>\n"
# EOF (control-D in your terminal)
[test]$ ./eb run type=stdout yaml=stdout-test cycles=1
[test]$ ./eb run driver=stdout yaml=stdout-test cycles=1
MISSING
[test]$ ./eb run type=stdout yaml=stdout-test cycles=1 linetoprint="THIS IS IT"
[test]$ ./eb run driver=stdout yaml=stdout-test cycles=1 linetoprint="THIS IS IT"
THIS IS IT
```
@ -610,4 +610,4 @@ If you are sure that the YAML should load, then please [submit a bug report](htt
This exception is thrown when the YAML was loaded, but the configuration object was not able to be constructed
from the in-memory YAML document. If this error occurs, it may be a bug in the YAML loader implementation.
Please [submit a bug report](https://github.com/nosqlbench/nosqlbench/issues/new?labels=bug) with details
on the type of YAML file you are trying to load.
on the type of YAML file you are trying to load.

View File

@ -67,9 +67,9 @@ public class RawYamlStatementLoaderTest {
RawScenarios rawScenarios = rawStmtsDoc.getRawScenarios();
assertThat(rawScenarios.getScenarioNames()).containsExactly("default", "schema-only");
List<String> defaultScenario = rawScenarios.getNamedScenario("default");
assertThat(defaultScenario).containsExactly("run type=stdout alias=step1","run type=stdout alias=step2");
assertThat(defaultScenario).containsExactly("run driver=stdout alias=step1","run driver=stdout alias=step2");
List<String> schemaOnlyScenario = rawScenarios.getNamedScenario("schema-only");
assertThat(schemaOnlyScenario).containsExactly("run type=blah tags=phase:schema");
assertThat(schemaOnlyScenario).containsExactly("run driver=blah tags=phase:schema");
assertThat(rawStmtsDoc.getName()).isEqualTo("doc1");
assertThat(blocks).hasSize(1);

View File

@ -1,9 +1,9 @@
scenarios:
default:
- run type=stdout alias=step1
- run type=stdout alias=step2
- run driver=stdout alias=step1
- run driver=stdout alias=step2
schema-only:
- run type=blah tags=phase:schema
- run driver=blah tags=phase:schema
tags:
atagname: atagvalue
name: doc1

View File

@ -24,6 +24,7 @@ public class NBCLIOptions {
// Discovery
private static final String HELP = "--help";
private static final String METRICS = "--list-metrics";
private static final String DRIVER_TYPES = "--list-drivers";
private static final String ACTIVITY_TYPES = "--list-activity-types";
private static final String WORKLOADS = "--list-workloads";
private static final String WANTS_INPUT_TYPES = "--list-input-types";
@ -267,6 +268,7 @@ public class NBCLIOptions {
arglist.removeFirst();
metricsPrefix = arglist.removeFirst();
break;
case DRIVER_TYPES:
case ACTIVITY_TYPES:
arglist.removeFirst();
wantsActivityTypes = true;

View File

@ -18,7 +18,7 @@ named argument to the previous command. The following example
is a commandline with a command *start*, and two named arguments
to that command.
PROG start type=diag alias=example
PROG start driver=diag alias=example
### Discovery options ###
@ -36,7 +36,7 @@ Provide specific help for the named activity type:
List the available activity types
--list-activity-types
--list-drivers
Provide the metrics that are available for scripting

View File

@ -66,6 +66,9 @@ public class TestNBCLIOptions {
assertThat(opts.wantsActivityTypes()).isTrue();
opts = new NBCLIOptions(new String[]{"--version"});
assertThat(opts.wantsActivityTypes()).isFalse();
opts = new NBCLIOptions(new String[]{"--list-drivers"});
assertThat(opts.wantsActivityTypes()).isTrue();
}
@Test
@ -129,7 +132,7 @@ public class TestNBCLIOptions {
@Test
public void shouldRecognizeStartActivityCmd() {
NBCLIOptions opts = new NBCLIOptions(new String[]{ "start", "type=woot" });
NBCLIOptions opts = new NBCLIOptions(new String[]{ "start", "driver=woot" });
List<NBCLIOptions.Cmd> cmds = opts.getCommands();
assertThat(cmds).hasSize(1);
assertThat(cmds.get(0).getCmdType()).isEqualTo(NBCLIOptions.CmdType.start);
@ -138,7 +141,7 @@ public class TestNBCLIOptions {
@Test
public void shouldRecognizeRunActivityCmd() {
NBCLIOptions opts = new NBCLIOptions(new String[]{ "run", "type=runwoot" });
NBCLIOptions opts = new NBCLIOptions(new String[]{ "run", "driver=runwoot" });
List<NBCLIOptions.Cmd> cmds = opts.getCommands();
assertThat(cmds).hasSize(1);
assertThat(cmds.get(0).getCmdType()).isEqualTo(NBCLIOptions.CmdType.run);

View File

@ -1,11 +1,11 @@
# nb -v run type=cql yaml=cql-iot tags=phase:schema host=dsehost
# nb -v run driver=cql yaml=cql-iot tags=phase:schema host=dsehost
scenarios:
default:
- run type==stdout yaml===scenario-test tags=phase:schema
- run type=stdout yaml===scenario-test tags=phase:rampup cycles=TEMPLATE(cycles,10)
- run type=stdout yaml===scenario-test tags=phase:main cycles=TEMPLATE(cycles,10)
- run driver==stdout yaml===scenario-test tags=phase:schema
- run driver=stdout yaml===scenario-test tags=phase:rampup cycles=TEMPLATE(cycles,10)
- run driver=stdout yaml===scenario-test tags=phase:main cycles=TEMPLATE(cycles,10)
schema-only:
- "run type=stdout yaml=scenario-test tags=phase:schema"
- "run driver=stdout yaml=scenario-test tags=phase:schema"
blocks:
- tags:
phase: schema

View File

@ -1,8 +1,8 @@
# example-scenarios.yaml
scenarios:
default:
- run cycles=3 alias=A type=stdout
- run cycles=5 alias=B type=stdout
- run cycles=3 alias=A driver=stdout
- run cycles=5 alias=B driver=stdout
bindings:
cycle: Identity()
name: NumberNameToCycle()

View File

@ -232,7 +232,7 @@ public class ScenarioController {
if (executor == null && createIfMissing) {
String activityTypeName = activityDef.getParams().getOptionalString("type").orElse(null);
String activityTypeName = activityDef.getParams().getOptionalString("driver","type").orElse(null);
List<String> knownTypes = ActivityType.FINDER.getAll().stream().map(ActivityType::getName).collect(Collectors.toList());
// Infer the type from either alias or yaml if possible (exactly one matches)
@ -249,7 +249,7 @@ public class ScenarioController {
}
if (activityTypeName==null) {
String errmsg = "You must provide a driver=<activity type> parameter. Valid examples are:\n" +
String errmsg = "You must provide a driver=<driver> parameter. Valid examples are:\n" +
knownTypes.stream().map(t -> " driver="+t+"\n").collect(Collectors.joining());
throw new BasicError(errmsg);
}

View File

@ -41,7 +41,7 @@ public class ActivityExecutorTest {
@Test
public void testDelayedStartSanity() {
ActivityDef ad = ActivityDef.parseActivityDef("type=diag;alias=test;cycles=1000;initdelay=5000;");
ActivityDef ad = ActivityDef.parseActivityDef("driver=diag;alias=test;cycles=1000;initdelay=5000;");
Optional<ActivityType> activityType = ActivityType.FINDER.get(ad.getActivityType());
Activity a = new DelayedInitActivity(ad);
InputDispenser idisp = new CoreInputDispenser(a);
@ -64,7 +64,7 @@ public class ActivityExecutorTest {
@Test(enabled=true)
public void testNewActivityExecutor() {
ActivityDef ad = ActivityDef.parseActivityDef("type=diag;alias=test;cycles=1000;");
ActivityDef ad = ActivityDef.parseActivityDef("driver=diag;alias=test;cycles=1000;");
Optional<ActivityType> activityType = ActivityType.FINDER.get(ad.getActivityType());
Input longSupplier = new AtomicInput(ad);
MotorDispenser<?> cmf = getActivityMotorFactory(
@ -144,4 +144,4 @@ public class ActivityExecutorTest {
logger.info("delayed for " + initdelay);
}
}
}
}

View File

@ -16,7 +16,7 @@ manageable.
It also means that it is relatively easy to provide a suitable
API for multi-protocol support. In fact, there are several drivers
avaialble in the current NoSQLBench distribution. You can list them
out with `./nb --list-activity-types`, and you can get help on
out with `./nb --list-drivers`, and you can get help on
how to use each of them with `./nb help <name>`.
This also is a way for us to encourage and empower other contributors

View File

@ -47,7 +47,7 @@ Provide specific help for the named activity type:
List the available activity types
--list-activity-types
--list-drivers
Provide the metrics that are available for scripting

View File

@ -16,9 +16,12 @@ Some activity parameters are universal in that they can be used with any activit
To see what activity parameters are valid for a given activity type, see the documentation for that activity type with `nosqlbench help <activity type>`.
:::
## type
## driver
- `type=<activity type>`
For historic reasons, you can also use `type`. They both mean the same thing for now, but `driver` is more descriptive.
The `type` parameter will continue to be supported in this major version (3.x), but it will be an error to use it in 4.x and newer.
- `driver=<activity type>`
- _default_: inferred from `alias` or `yaml` parameters, or unset
- _required_: yes, unless inferred
- _dynamic_: no

View File

@ -13,10 +13,10 @@ You can provide named scenarios for a workload like this:
# contents of myworkloads.yaml
scenarios:
default:
- run type=diag cycles=10 alias=first-ten
- run type=diag cycles=10..20 alias=second-ten
- run driver=diag cycles=10 alias=first-ten
- run driver=diag cycles=10..20 alias=second-ten
longrun:
- run type=diag cycles=10M
- run driver=diag cycles=10M
```
This provides a way to specify more detailed workflows that users may want
@ -51,8 +51,8 @@ in the named scenario's script.
# example-scenarios.yaml
scenarios:
default:
- run cycles=3 alias=A type=stdout
- run cycles=5 alias=B type=stdout
- run cycles=3 alias=A driver=stdout
- run cycles=5 alias=B driver=stdout
bindings:
cycle: Identity()
name: NumberNameToCycle()

View File

@ -1,11 +1,13 @@
---
title: Activity Types
title: Driver Types
weight: 50
---
Each nosqlbench scenario is comprised of one or more activities of a specific type. The types of activities available are provided by the version of nosqlbench.
Each nosqlbench scenario is comprised of one or more activities of a specific type.
The types of activities available are provided by the version of nosqlbench.
Additional activity types will be added in future releases. There are command line help topics for each activity type (driver).
Additional activity types will be added in future releases.
There are command line help topics for each activity type (driver).
To get a list of topics run:

View File

@ -44,7 +44,7 @@ public class ExitStatusIntegrationTests {
ProcessInvoker invoker = new ProcessInvoker();
invoker.setLogDir("logs/test");
ProcessResult result = invoker.run("exitstatus_initexception", 15,
"java", "-jar", JARNAME, "--logs-dir", "logs/test", "run", "type=diag", "initdelay=notanumber"
"java", "-jar", JARNAME, "--logs-dir", "logs/test", "run", "driver=diag", "initdelay=notanumber"
);
String stderr = result.getStdoutData().stream().collect(Collectors.joining("\n"));
assertThat(stderr).contains("Error initializing activity 'ALIAS_UNSET': For input string: \"notanumber\"");
@ -59,7 +59,7 @@ public class ExitStatusIntegrationTests {
// ProcessInvoker invoker = new ProcessInvoker();
// invoker.setLogDir("logs/test");
// ProcessResult result = invoker.run("exitstatus_threadexception", 30,
// "java", "-jar", JARNAME, "--logs-dir", "logs/test", "run", "type=diag", "throwoncycle=10", "cycles=1000", "cyclerate=10", "-vvv"
// "java", "-jar", JARNAME, "--logs-dir", "logs/test", "run", "driver=diag", "throwoncycle=10", "cycles=1000", "cyclerate=10", "-vvv"
// );
// String stdout = result.getStdoutData().stream().collect(Collectors.joining("\n"));
// assertThat(stdout).contains("Diag was asked to throw an error on cycle 10");
@ -71,7 +71,7 @@ public class ExitStatusIntegrationTests {
ProcessInvoker invoker = new ProcessInvoker();
invoker.setLogDir("logs/test");
ProcessResult result = invoker.run("exitstatus_asyncstoprequest", 30,
"java", "-jar", JARNAME, "--logs-dir", "logs/test", "run", "type=diag", "async=1", "cyclerate=5", "erroroncycle=10", "cycles=2000", "-vvv"
"java", "-jar", JARNAME, "--logs-dir", "logs/test", "run", "driver=diag", "async=1", "cyclerate=5", "erroroncycle=10", "cycles=2000", "-vvv"
);
String stdout = result.getStdoutData().stream().collect(Collectors.joining("\n"));
assertThat(stdout).contains("Diag was requested to stop on cycle 10");

View File

@ -31,7 +31,7 @@ public class MetricsIntegrationTest {
@Test
public void testHistogramLogger() {
ActivityDef ad = ActivityDef.parseActivityDef("alias=foo;type=diag");
ActivityDef ad = ActivityDef.parseActivityDef("alias=foo;driver=diag");
Histogram testhistogram = ActivityMetrics.histogram(ad, "testhistogram");
ActivityMetrics.addHistoLogger("testsession", ".*","testhisto.log","1s");
testhistogram.update(400);

View File

@ -23,8 +23,8 @@ public class MetricsMapperIntegrationTest {
@Test
public void testDiagMetrics() {
String diagMetrics = MetricsMapper.metricsDetail("type=diag;alias=foo;cycles=1");
String diagMetrics = MetricsMapper.metricsDetail("driver=diag;alias=foo;cycles=1");
assertThat(diagMetrics).contains("metrics.foo.diagdelay.snapshot.p98ms");
}
}
}