diff --git a/adapter-cqld4/src/main/resources/activities/baselines/cql-iot.yaml b/adapter-cqld4/src/main/resources/activities/baselines/cql-iot.yaml index 05e2df1b9..2809b6747 100644 --- a/adapter-cqld4/src/main/resources/activities/baselines/cql-iot.yaml +++ b/adapter-cqld4/src/main/resources/activities/baselines/cql-iot.yaml @@ -6,13 +6,13 @@ description: | scenarios: default: - schema: run driver=cql tags==phase:schema threads==1 cycles==UNDEF - rampup: run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto - main: run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto + schema: run driver=cql tags==block:schema threads==1 cycles==UNDEF + rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto + main: run driver=cql tags==block:"main-*.*" cycles===TEMPLATE(main-cycles,10000000) threads=auto astra: - schema: run driver=cql tags==phase:schema-astra threads==1 cycles==UNDEF - rampup: run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto - main: run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto + schema: run driver=cql tags==block:schema-astra threads==1 cycles==UNDEF + rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto + main: run driver=cql tags==block:"main-*.*" cycles===TEMPLATE(main-cycles,10000000) threads=auto params: instrument: TEMPLATE(instrument,false) @@ -20,7 +20,7 @@ params: bindings: machine_id: Mod(<>); ToHashedUUID() -> java.util.UUID sensor_name: HashedLineToString('data/variable_words.txt') - time: Mul(<>L); Div(<>L); ToDate() + time: Mul(<>L); Div(<>L); ToJavaInstant(); cell_timestamp: Mul(<>L); Div(<>L); Mul(1000L) sensor_value: Normal(0.0,5.0); Add(100.0) -> double station_id: Div(<>);Mod(<>); ToHashedUUID() -> java.util.UUID diff --git a/adapter-cqld4/src/main/resources/activities/baselines/cql-keyvalue.yaml b/adapter-cqld4/src/main/resources/activities/baselines/cql-keyvalue.yaml index d93a68708..10c7226bc 100644 --- a/adapter-cqld4/src/main/resources/activities/baselines/cql-keyvalue.yaml +++ b/adapter-cqld4/src/main/resources/activities/baselines/cql-keyvalue.yaml @@ -1,14 +1,22 @@ -description: A workload with only text keys and text values +description: | + A workload with only text keys and text values. + This workload is rather simple but it is useful for demonstration purposes. + If you want a more thorough example, you might be interested in the + baselinesv2/cql-* workloads. + defaults: + TEMPLATE(keyspace,baselines) + TEMPLATE(table,keyvalue) + scenarios: default: - schema: run driver=cql tags==phase:schema threads==1 cycles==UNDEF - rampup: run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto - main: run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto + schema: run driver=cql tags==block:schema threads==1 cycles==UNDEF + rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto + main: run driver=cql tags=='block:main-.*' cycles===TEMPLATE(main-cycles,10000000) threads=auto astra: - schema: run driver=cql tags==phase:schema-astra threads==1 cycles==UNDEF - rampup: run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto - main: run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto + schema: run driver=cql tags==block:schema-astra threads==1 cycles==UNDEF + rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto + main: run driver=cql tags=='block:main-.*' cycles===TEMPLATE(main-cycles,10000000) threads=auto bindings: seq_key: Mod(<>); ToString() -> String @@ -17,86 +25,60 @@ bindings: rw_value: Hash(); <int>>; ToString() -> String blocks: - - name: schema - tags: - phase: schema - params: - prepared: false - statements: - - create-keyspace: | - create keyspace if not exists <> - WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<>'} - AND durable_writes = true; - tags: - name: create-keyspace - - create-table: | - create table if not exists <>.<> ( + schema: + ops: + create-keyspace: + raw: | + create keyspace if not exists TEMPLATE(keyspace,baselines) + WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 'TEMPLATE(rf,1)>>'} + AND durable_writes = true; + create-table: + raw: | + create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) ( + key text, + value text, + PRIMARY KEY (key) + ); + schema-astra: + ops: + create-table: + raw: | + create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) ( key text, value text, PRIMARY KEY (key) ); - tags: - name: create-table - - name: schema-astra - tags: - phase: schema-astra + rampup: params: - prepared: false - statements: - - create-table: | - create table if not exists <>.<> ( - key text, - value text, - PRIMARY KEY (key) - ); - tags: - name: create-table-astra - - name: rampup - tags: - phase: rampup - params: - cl: <> - statements: - - rampup-insert: | - insert into <>.<> + cl: TEMPLATE(write_cl,LOCAL_QUORUM) + ops: + rampup-insert: + prepared: | + insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) (key, value) values ({seq_key},{seq_value}); - tags: - name: rampup-insert - - name: verify - tags: - phase: verify - type: read - params: - cl: <> - statements: - - verify-select: | - select * from <>.<> where key={seq_key}; - verify-fields: key->seq_key, value->seq_value - tags: - name: verify - - name: main-read - tags: - phase: main - type: read +# verify: +# params: +# cl: <> +# ops: +# verify-select: +# prepared: | +# select * from <>.<> where key={seq_key}; +# verify-fields: key->seq_key, value->seq_value + main-read: params: ratio: 5 - cl: <> - statements: - - main-select: | - select * from <>.<> where key={rw_key}; - tags: - name: main-select - - name: main-write - tags: - phase: main - type: write + cl: TEMPLATE(read_cl,LOCAL_QUORUM) + ops: + main-select: + prepared: | + select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) where key={rw_key}; + main-write: params: ratio: 5 - cl: <> - statements: - - main-insert: | - insert into <>.<> + cl: TEMPLATE(write_cl,LOCAL_QUORUM) + ops: + main-insert: + prepared: | + insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) (key, value) values ({rw_key}, {rw_value}); - tags: - name: main-insert diff --git a/engine-cli/src/main/java/io/nosqlbench/engine/cli/NBCLI.java b/engine-cli/src/main/java/io/nosqlbench/engine/cli/NBCLI.java index 53030962d..5f0ab53ff 100644 --- a/engine-cli/src/main/java/io/nosqlbench/engine/cli/NBCLI.java +++ b/engine-cli/src/main/java/io/nosqlbench/engine/cli/NBCLI.java @@ -165,7 +165,11 @@ public class NBCLI implements Function { logger = LogManager.getLogger("NBCLI"); loggerConfig.purgeOldFiles(LogManager.getLogger("SCENARIO")); - logger.info(() -> "Configured scenario log at " + loggerConfig.getLogfileLocation()); + if (logger.isInfoEnabled()) { + logger.info(() -> "Configured scenario log at " + loggerConfig.getLogfileLocation()); + } else { + System.err.println("Configured scenario log at " + loggerConfig.getLogfileLocation()); + } logger.debug("Scenario log started"); // Global only processing