mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
topics.md in each module + yaml / workload synonym
This commit is contained in:
parent
9c8dfb33a7
commit
18880af559
@ -276,6 +276,10 @@ public class CqlActivity extends SimpleActivity implements Activity, ActivityDef
|
||||
StmtsDocList doclist = null;
|
||||
|
||||
String yaml_loc = activityDef.getParams().getOptionalString("yaml").orElse("default");
|
||||
if (yaml_loc.equals("default")){
|
||||
yaml_loc = activityDef.getParams().getOptionalString("workload").orElse("default");
|
||||
}
|
||||
|
||||
StrInterpolator interp = new StrInterpolator(activityDef);
|
||||
|
||||
String yamlVersion = "unset";
|
||||
|
@ -18,10 +18,13 @@ public class CqlActivityType implements ActivityType<CqlActivity> {
|
||||
@Override
|
||||
public CqlActivity getActivity(ActivityDef activityDef) {
|
||||
Optional<String> yaml = activityDef.getParams().getOptionalString("yaml");
|
||||
if (!yaml.isPresent()) {
|
||||
yaml = activityDef.getParams().getOptionalString("workload");
|
||||
}
|
||||
|
||||
// sanity check that we have a yaml parameter, which contains our statements and bindings
|
||||
if (yaml.isEmpty()) {
|
||||
throw new RuntimeException("Currently, the cql activity type requires yaml activity parameter.");
|
||||
throw new RuntimeException("Currently, the cql activity type requires yaml/workload activity parameter.");
|
||||
}
|
||||
|
||||
// allow shortcut: yaml parameter provide the default alias name
|
||||
@ -42,6 +45,4 @@ public class CqlActivityType implements ActivityType<CqlActivity> {
|
||||
return new CqlActionDispenser(activity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,11 +1,4 @@
|
||||
# additional help topics
|
||||
|
||||
## (activity types)
|
||||
|
||||
# cql help topics
|
||||
- cql
|
||||
- cqlverify
|
||||
|
||||
## general topics
|
||||
|
||||
- cqlerrors
|
||||
- cqlexceptionlist
|
||||
- cqlexceptionlist
|
||||
|
2
activitytype-cqlverify/src/main/resources/topics.md
Normal file
2
activitytype-cqlverify/src/main/resources/topics.md
Normal file
@ -0,0 +1,2 @@
|
||||
# cql-verify help topics
|
||||
- cqlverify
|
2
activitytype-diag/src/main/resources/topics.md
Normal file
2
activitytype-diag/src/main/resources/topics.md
Normal file
@ -0,0 +1,2 @@
|
||||
# diag help topics
|
||||
- diag
|
@ -57,6 +57,9 @@ public class HttpActivity extends SimpleActivity implements Activity, ActivityDe
|
||||
String yaml_loc = activityDef.getParams()
|
||||
.getOptionalString("yaml")
|
||||
.orElse("default");
|
||||
if (yaml_loc.equals("default")) {
|
||||
yaml_loc = activityDef.getParams().getOptionalString("workload").orElse("default");
|
||||
}
|
||||
|
||||
stmtsDocList = StatementsLoader.load(logger,yaml_loc, "activities");
|
||||
}
|
||||
@ -142,4 +145,4 @@ public class HttpActivity extends SimpleActivity implements Activity, ActivityDe
|
||||
public OpSequence<StringBindings> getOpSequence() {
|
||||
return opSequence;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -73,6 +73,10 @@ public class StdoutActivity extends SimpleActivity implements ActivityDefObserve
|
||||
super(activityDef);
|
||||
StrInterpolator interp = new StrInterpolator(activityDef);
|
||||
String yaml_loc = activityDef.getParams().getOptionalString("yaml").orElse("default");
|
||||
if (yaml_loc.equals("default")) {
|
||||
yaml_loc = activityDef.getParams().getOptionalString("workload").orElse("default");
|
||||
}
|
||||
|
||||
this.showstmts = activityDef.getParams().getOptionalBoolean("showstatements").orElse(false);
|
||||
this.fileName = activityDef.getParams().getOptionalString("filename").orElse("stdout");
|
||||
this.stmtsDocList = StatementsLoader.load(logger, yaml_loc, interp, "activities");
|
||||
@ -213,4 +217,4 @@ public class StdoutActivity extends SimpleActivity implements ActivityDefObserve
|
||||
public Boolean getShowstmts() {
|
||||
return showstmts;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,10 @@ public class StdoutActivityType implements ActivityType<StdoutActivity> {
|
||||
@Override
|
||||
public StdoutActivity getActivity(ActivityDef activityDef) {
|
||||
Optional<String> yaml = activityDef.getParams().getOptionalString("yaml");
|
||||
if (!yaml.isPresent()) {
|
||||
yaml= activityDef.getParams().getOptionalString("workload");
|
||||
}
|
||||
|
||||
|
||||
// sanity check that we have a yaml parameter, which contains our statements and bindings
|
||||
if (!yaml.isPresent()) {
|
||||
@ -54,4 +58,4 @@ public class StdoutActivityType implements ActivityType<StdoutActivity> {
|
||||
return new StdoutAction(slot, activity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
activitytype-stdout/src/main/resources/topics.md
Normal file
2
activitytype-stdout/src/main/resources/topics.md
Normal file
@ -0,0 +1,2 @@
|
||||
# stdout help topics
|
||||
- stdout
|
36
activitytype-tcp/src/main/resources/tcp.md
Normal file
36
activitytype-tcp/src/main/resources/tcp.md
Normal file
@ -0,0 +1,36 @@
|
||||
# tcp activity type
|
||||
|
||||
There are two tcp activity types, tcpclient and tcpserver which
|
||||
allow for the generation of data via a tcp client or server.
|
||||
|
||||
## Example activity definitions
|
||||
|
||||
Run a stdout activity named 'stdout-test', with definitions from activities/stdout-test.yaml
|
||||
~~~
|
||||
... type=tcpclient yaml=stdout-test
|
||||
~~~
|
||||
|
||||
Run a stdout activity named 'stdout-test', with definitions from activities/stdout-test.yaml
|
||||
~~~
|
||||
... type=tcpserver yaml=stdout-test
|
||||
~~~
|
||||
|
||||
## ActivityType Parameters
|
||||
|
||||
- **ssl** - boolean to enable or disable ssl
|
||||
(defaults to false)
|
||||
- **host** - this is the name of the output file
|
||||
(defaults to "localhost")
|
||||
- **port** - this is the name of the output file
|
||||
(defaults to "12345")
|
||||
|
||||
## Configuration
|
||||
|
||||
This activity type uses the uniform yaml configuration format.
|
||||
For more details on this format, please refer to the
|
||||
[Standard YAML Format](http://docs.nosqlbench.io/user-guide/standard_yaml/)
|
||||
|
||||
## Statement Format
|
||||
|
||||
Refer to stdout help for details on the statement format for the tcp
|
||||
activity types
|
2
activitytype-tcp/src/main/resources/topics.md
Normal file
2
activitytype-tcp/src/main/resources/topics.md
Normal file
@ -0,0 +1,2 @@
|
||||
# tcp help topics
|
||||
- tcp
|
@ -1,4 +1,4 @@
|
||||
### Basic Command-Line Options ###
|
||||
### Command-Line Options ###
|
||||
|
||||
Help ( You're looking at it. )
|
||||
|
||||
@ -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 type=diag alias=example
|
||||
|
||||
### Discovery options ###
|
||||
|
||||
@ -79,7 +79,7 @@ where `<level>` can be one of OFF, ERROR, WARN, INFO, DEBUG, TRACE, or ALL
|
||||
Specify an override for one or more classes:
|
||||
|
||||
--log-level-override com.foobarbaz:DEBUG,com.barfoobaz:TRACE
|
||||
|
||||
|
||||
Specify the logging pattern:
|
||||
|
||||
--with-logging-pattern '%date %level [%thread] %logger{10} [%file:%line] %msg%n'
|
||||
@ -90,7 +90,7 @@ Specify the logging pattern:
|
||||
Specify a directory and enable CSV reporting of metrics:
|
||||
|
||||
--report-csv-to <dirname>
|
||||
|
||||
|
||||
Specify the graphite destination and enable reporting
|
||||
|
||||
--report-graphite-to <addr>[:<port>]
|
||||
@ -116,11 +116,11 @@ Log HDR histogram stats to a CSV file
|
||||
--log-histostats 'stats.csv:.*' # same as above
|
||||
--log-histostats 'stats.csv:.*:1m' # with 1-minute interval
|
||||
--log-histostats 'stats.csv:.*specialmetrics:10s'
|
||||
|
||||
|
||||
Adjust the progress reporting inverval
|
||||
|
||||
--progress console:10s
|
||||
|
||||
|
||||
or
|
||||
|
||||
--progress logonly:5m
|
||||
@ -131,8 +131,8 @@ for your histograms and timers, you may do so with this option:
|
||||
--classic-histograms prefix
|
||||
--classic-histograms 'prefix:.*' # same as above
|
||||
--classic-histograms 'prefix:.*specialmetrics' # subset of names
|
||||
|
||||
|
||||
|
||||
|
||||
Name the current session, for logfile naming, etc
|
||||
By default, this will be "scenario-TIMESTAMP", and a logfile will be created
|
||||
for this name.
|
||||
@ -153,15 +153,15 @@ with the default credentials admin/admin).
|
||||
### Console Options ###
|
||||
Increase console logging levels: (Default console logging level is *warning*)
|
||||
|
||||
-v (info)
|
||||
-v (info)
|
||||
-vv (debug)
|
||||
-vvv (trace)
|
||||
|
||||
--progress console:1m (disables itself if -v options are used)
|
||||
|
||||
These levels affect *only* the console output level. Other logging level
|
||||
parameters affect logging to the scenario log, stored by default in logs/...
|
||||
|
||||
parameters affect logging to the scenario log, stored by default in logs/...
|
||||
|
||||
Show version, long form, with artifact coordinates.
|
||||
|
||||
--version
|
||||
|
3
engine-cli/src/main/resources/topics.md
Normal file
3
engine-cli/src/main/resources/topics.md
Normal file
@ -0,0 +1,3 @@
|
||||
# global help topics
|
||||
- commandline
|
||||
- cli_scripting
|
@ -241,6 +241,7 @@ public class ScenarioController {
|
||||
n ->
|
||||
activityDef.getParams().getOptionalString("alias").orElse("").contains(n)
|
||||
|| activityDef.getParams().getOptionalString("yaml").orElse("").contains(n)
|
||||
|| activityDef.getParams().getOptionalString("workload").orElse("").contains(n)
|
||||
).collect(Collectors.toList());
|
||||
if (matching.size()==1) {
|
||||
activityTypeName=matching.get(0);
|
||||
|
Loading…
Reference in New Issue
Block a user