mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-20 11:38:28 -06:00
baselinesv2 format updates for nb5, no substance change only structure
This commit is contained in:
parent
a7c29b2825
commit
8d3d92987d
@ -0,0 +1,83 @@
|
||||
min_version: "4.17.15"
|
||||
|
||||
description: |
|
||||
A workload with only text keys and text values which range in size from 50K to 150K.
|
||||
The CQL Key-Value workload demonstrates the simplest possible schema with payload data. This is useful for measuring
|
||||
system capacity most directly in terms of raw operations. As a reference point, it provides some insight around types of
|
||||
workloads that are constrained around messaging, threading, and tasking, rather than bulk throughput.
|
||||
During preload, all keys are set with a value. During the main phase of the workload, random keys from the known
|
||||
population are replaced with new values which never repeat. During the main phase, random partitions are selected for
|
||||
upsert, with row values never repeating.
|
||||
|
||||
scenarios:
|
||||
default:
|
||||
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==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(TEMPLATE(keycount,1000000000)); ToString();
|
||||
# write a random size of text from 50K to 150K, avg 100K, sampled from a static image of text in memory that is 16MB
|
||||
seq_value: Hash(); Mod(TEMPLATE(valuecount,1000000000)); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,50000),TEMPLATE(maxtext,150000))); ToString();
|
||||
rw_key: TEMPLATE(keydist,Uniform(0,1000000000)->int); ToString() -> String
|
||||
rw_value: Hash(); TEMPLATE(valdist,Uniform(0,1000000000)->int); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,50000),TEMPLATE(maxtext,150000))); ToString();
|
||||
|
||||
blocks:
|
||||
schema:
|
||||
params:
|
||||
prepared: false
|
||||
ops:
|
||||
create-keyspace: |
|
||||
create keyspace if not exists TEMPLATE(keyspace:baselines)
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 'TEMPLATE(rf:1)'}
|
||||
AND durable_writes = true;
|
||||
create-table: |
|
||||
create table if not exists TEMPLATE(keyspace:baselines).TEMPLATE(table:keyvalue) (
|
||||
key text,
|
||||
value text,
|
||||
PRIMARY KEY (key)
|
||||
);
|
||||
schema-astra:
|
||||
params:
|
||||
prepared: false
|
||||
statements:
|
||||
create-table: |
|
||||
create table if not exists TEMPLATE(keyspace:baselines).TEMPLATE(table:keyvalue) (
|
||||
key text,
|
||||
value text,
|
||||
PRIMARY KEY (key)
|
||||
);
|
||||
rampup:
|
||||
params:
|
||||
cl: TEMPLATE(write_cl:LOCAL_QUORUM)
|
||||
ops:
|
||||
rampup-insert: |
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue)
|
||||
(key, value)
|
||||
values ({seq_key},{seq_value});
|
||||
verify:
|
||||
params:
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
verify-select: |
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) where key={seq_key};
|
||||
verify-fields: key->seq_key, value->seq_value
|
||||
main-read:
|
||||
params:
|
||||
ratio: 5
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
statements:
|
||||
main-select: |
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) where key={rw_key};
|
||||
main-write:
|
||||
params:
|
||||
ratio: 5
|
||||
cl: TEMPLATE(write_cl,LOCAL_QUORUM)
|
||||
statements:
|
||||
main-insert: |
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue)
|
||||
(key, value) values ({rw_key}, {rw_value});
|
@ -1,3 +1,5 @@
|
||||
min_version: "4.17.15"
|
||||
|
||||
description: |
|
||||
A workload with only text keys and text values.
|
||||
The CQL Key-Value workload demonstrates the simplest possible schema with payload data. This is useful for measuring
|
||||
@ -7,23 +9,23 @@ description: |
|
||||
population are replaced with new values which never repeat. During the main phase, random partitions are selected for
|
||||
upsert, with row values never repeating.
|
||||
|
||||
version_regex: '4.17.*|5..+'
|
||||
|
||||
|
||||
scenarios:
|
||||
default:
|
||||
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
|
||||
main: run driver=cql tags==block:'main.*' cycles===TEMPLATE(main-cycles,10000000) threads=auto
|
||||
astra:
|
||||
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
|
||||
main: run driver=cql tags==block:'main.*' cycles===TEMPLATE(main-cycles,10000000) threads=auto
|
||||
|
||||
bindings:
|
||||
seq_key: Mod(<<keycount:1000000000>>); ToString() -> String
|
||||
seq_value: Hash(); Mod(<<valuecount:1000000000>>); ToString() -> String
|
||||
rw_key: <<keydist:Uniform(0,1000000000)->int>>; ToString() -> String
|
||||
rw_value: Hash(); <<valdist:Uniform(0,1000000000)->int>>; ToString() -> String
|
||||
seq_key: Mod(TEMPLATE(keycount:1000000000)); ToString() -> String
|
||||
seq_value: Hash(); Mod(TEMPLATE(valuecount:1000000000)); ToString() -> String
|
||||
rw_key: TEMPLATE(keydist:Uniform(0,1000000000)->int); ToString() -> String
|
||||
rw_value: Hash(); TEMPLATE(valdist:Uniform(0,1000000000)->int); ToString() -> String
|
||||
|
||||
blocks:
|
||||
schema:
|
||||
@ -31,53 +33,52 @@ blocks:
|
||||
prepared: false
|
||||
ops:
|
||||
create-keyspace: |
|
||||
create keyspace if not exists <<keyspace:baselines>>
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'}
|
||||
create keyspace if not exists TEMPLATE(keyspace:baselines)
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 'TEMPLATE(rf:1)'}
|
||||
AND durable_writes = true;
|
||||
create-table: |
|
||||
create table if not exists <<keyspace:baselines>>.<<table:keyvalue>> (
|
||||
key text,
|
||||
value text,
|
||||
PRIMARY KEY (key)
|
||||
);
|
||||
schema-astra:
|
||||
params:
|
||||
prepared: false
|
||||
ops:
|
||||
create-table: |
|
||||
create table if not exists <<keyspace:baselines>>.<<table:keyvalue>> (
|
||||
create table if not exists TEMPLATE(keyspace:baselines).TEMPLATE(table:keyvalue) (
|
||||
key text,
|
||||
value text,
|
||||
PRIMARY KEY (key)
|
||||
);
|
||||
schema-astra:
|
||||
params:
|
||||
prepared: false
|
||||
statements:
|
||||
create-table: |
|
||||
create table if not exists TEMPLATE(keyspace:baselines).TEMPLATE(table:keyvalue) (
|
||||
key text,
|
||||
value text,
|
||||
PRIMARY KEY (key)
|
||||
);
|
||||
rampup:
|
||||
params:
|
||||
cl: <<write_cl:LOCAL_QUORUM>>
|
||||
cl: TEMPLATE(write_cl:LOCAL_QUORUM)
|
||||
ops:
|
||||
rampup-insert: |
|
||||
insert into <<keyspace:baselines>>.<<table:keyvalue>>
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue)
|
||||
(key, value)
|
||||
values ({seq_key},{seq_value});
|
||||
verify:
|
||||
params:
|
||||
cl: <<read_cl:LOCAL_QUORUM>>
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
verify-select: |
|
||||
select * from <<keyspace:baselines>>.<<table:keyvalue>> where key={seq_key};
|
||||
verify-fields: key->seq_key, value->seq_value
|
||||
space: "{{Combinations('A-C')}}"
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) where key={seq_key};
|
||||
verify-fields: key->seq_key, value->seq_value
|
||||
main-read:
|
||||
params:
|
||||
ratio: 5
|
||||
cl: <<read_cl:LOCAL_QUORUM>>
|
||||
ops:
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
statements:
|
||||
main-select: |
|
||||
select * from <<keyspace:baselines>>.<<table:keyvalue>> where key={rw_key};
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) where key={rw_key};
|
||||
main-write:
|
||||
params:
|
||||
ratio: 5
|
||||
cl: <<write_cl:LOCAL_QUORUM>>
|
||||
ops:
|
||||
cl: TEMPLATE(write_cl,LOCAL_QUORUM)
|
||||
statements:
|
||||
main-insert: |
|
||||
insert into <<keyspace:baselines>>.<<table:keyvalue>>
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue)
|
||||
(key, value) values ({rw_key}, {rw_value});
|
||||
|
@ -1,3 +1,5 @@
|
||||
min_version: "4.17.15"
|
||||
|
||||
description: |
|
||||
A tabular workload with partitions, clusters, and data fields
|
||||
This workload contains partitioning and cluster along with a set
|
||||
@ -18,159 +20,120 @@ description: |
|
||||
By default, reads occur at the same ratio as writes, with main
|
||||
phase writes writing full rows.
|
||||
|
||||
You can bulk up the size of the payloads by 10x with addzeros='0',
|
||||
by 100x with addzeros='00', and so on, but if you want to go higher
|
||||
than 100x, you'll need to modify the workload with a larger reference
|
||||
file in the HashedFileExtractToString(...) bindings.
|
||||
|
||||
scenarios:
|
||||
default:
|
||||
schema: run driver=cql tags==phase:schema threads==1 cycles==UNDEF
|
||||
rampup: run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10B) threads=auto
|
||||
main: run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,100M) threads=auto
|
||||
schema: run driver=cql tags==phase:schema threads==1 cycles==UNDEF
|
||||
rampup: run driver=cql tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10B) threads=auto
|
||||
main: run driver=cql tags==phase:main cycles===TEMPLATE(main-cycles,100M) threads=auto
|
||||
schema: run driver=cql tags==block:schema threads==1 cycles==UNDEF
|
||||
rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10B) threads=auto
|
||||
main: run driver=cql tags==block:'main.*' cycles===TEMPLATE(main-cycles,100M) 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: true
|
||||
bindings:
|
||||
|
||||
bindings:
|
||||
# for ramp-up and verify phases
|
||||
#
|
||||
part_layout: Div(<<partsize:1000>>); ToString() -> String
|
||||
clust_layout: Mod(<<partsize:1000>>); ToString() -> String
|
||||
# todo: update these definitions to use the simpler 10,0.1, 20, 0.2, ...
|
||||
data0: Add(10); HashedFileExtractToString('data/lorem_ipsum_full.txt',9,11)
|
||||
data1: Add(20); HashedFileExtractToString('data/lorem_ipsum_full.txt',18,22)
|
||||
data2: Add(30); HashedFileExtractToString('data/lorem_ipsum_full.txt',27,33)
|
||||
data3: Add(40); HashedFileExtractToString('data/lorem_ipsum_full.txt',45,55)
|
||||
data4: Add(50); HashedFileExtractToString('data/lorem_ipsum_full.txt',72,88)
|
||||
data5: Add(60); HashedFileExtractToString('data/lorem_ipsum_full.txt',107,143)
|
||||
data6: Add(70); HashedFileExtractToString('data/lorem_ipsum_full.txt',189,231)
|
||||
data7: Add(80); HashedFileExtractToString('data/lorem_ipsum_full.txt',306,374)
|
||||
data0: Add(10); HashedFileExtractToString('data/lorem_ipsum_full.txt',9TEMPLATE(addzeros,),11TEMPLATE(addzeros,))
|
||||
data1: Add(20); HashedFileExtractToString('data/lorem_ipsum_full.txt',18TEMPLATE(addzeros,),22TEMPLATE(addzeros,))
|
||||
data2: Add(30); HashedFileExtractToString('data/lorem_ipsum_full.txt',27TEMPLATE(addzeros,),33TEMPLATE(addzeros,))
|
||||
data3: Add(40); HashedFileExtractToString('data/lorem_ipsum_full.txt',45TEMPLATE(addzeros,),55TEMPLATE(addzeros,))
|
||||
data4: Add(50); HashedFileExtractToString('data/lorem_ipsum_full.txt',72TEMPLATE(addzeros,),88TEMPLATE(addzeros,))
|
||||
data5: Add(60); HashedFileExtractToString('data/lorem_ipsum_full.txt',107TEMPLATE(addzeros,),143TEMPLATE(addzeros,))
|
||||
data6: Add(70); HashedFileExtractToString('data/lorem_ipsum_full.txt',189TEMPLATE(addzeros,),231TEMPLATE(addzeros,))
|
||||
data7: Add(80); HashedFileExtractToString('data/lorem_ipsum_full.txt',306TEMPLATE(addzeros,),374TEMPLATE(addzeros,))
|
||||
|
||||
# for main phase
|
||||
# for write
|
||||
part_write: Hash(); Uniform(0,<<partcount:100>>)->int; ToString() -> String
|
||||
clust_write: Hash(); Add(1); Uniform(0,<<partsize:1000000>>)->int; ToString() -> String
|
||||
part_write: Hash(); Uniform(0,TEMPLATE(partcount,100))->int; ToString() -> String
|
||||
clust_write: Hash(); Add(1); Uniform(0,TEMPLATE(partsize,1000000))->int; ToString() -> String
|
||||
data_write: Hash(); HashedFileExtractToString('data/lorem_ipsum_full.txt',50,150) -> String
|
||||
|
||||
# for read
|
||||
limit: Uniform(1,10) -> int
|
||||
part_read: Uniform(0,<<partcount:100>>)->int; ToString() -> String
|
||||
clust_read: Add(1); Uniform(0,<<partsize:1000000>>)->int; ToString() -> String
|
||||
part_read: Uniform(0,TEMPLATE(partcount,100))->int; ToString() -> String
|
||||
clust_read: Add(1); Uniform(0,TEMPLATE(partsize,1000000))->int; ToString() -> String
|
||||
|
||||
blocks:
|
||||
- name: schema
|
||||
tags:
|
||||
phase: schema
|
||||
schema:
|
||||
params:
|
||||
prepared: false
|
||||
statements:
|
||||
- create-keyspace: |
|
||||
create keyspace if not exists <<keyspace:baselines>>
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'}
|
||||
AND durable_writes = true;
|
||||
tags:
|
||||
name: create-keyspace
|
||||
- create-table: |
|
||||
create table if not exists <<keyspace:baselines>>.<<table:tabular>> (
|
||||
part text,
|
||||
clust text,
|
||||
data0 text, data1 text, data2 text, data3 text,
|
||||
data4 text, data5 text, data6 text, data7 text,
|
||||
PRIMARY KEY (part,clust)
|
||||
);
|
||||
tags:
|
||||
name: create-table
|
||||
- name: schema-astra
|
||||
tags:
|
||||
phase: schema-astra
|
||||
ops:
|
||||
create-keyspace: |
|
||||
create keyspace if not exists TEMPLATE(keyspace,baselines)
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 'TEMPLATE(rf,1)'}
|
||||
AND durable_writes = true;
|
||||
create-table: |
|
||||
create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) (
|
||||
part text,
|
||||
clust text,
|
||||
data0 text, data1 text, data2 text, data3 text,
|
||||
data4 text, data5 text, data6 text, data7 text,
|
||||
PRIMARY KEY (part,clust)
|
||||
);
|
||||
schema-astra:
|
||||
params:
|
||||
prepared: false
|
||||
statements:
|
||||
- create-table: |
|
||||
create table if not exists <<keyspace:baselines>>.<<table:tabular>> (
|
||||
part text,
|
||||
clust text,
|
||||
data0 text, data1 text, data2 text, data3 text,
|
||||
data4 text, data5 text, data6 text, data7 text,
|
||||
PRIMARY KEY (part,clust)
|
||||
);
|
||||
tags:
|
||||
name: create-table-astra
|
||||
- name: rampup
|
||||
tags:
|
||||
phase: rampup
|
||||
ops:
|
||||
create-table: |
|
||||
create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) (
|
||||
part text,
|
||||
clust text,
|
||||
data0 text, data1 text, data2 text, data3 text,
|
||||
data4 text, data5 text, data6 text, data7 text,
|
||||
PRIMARY KEY (part,clust)
|
||||
);
|
||||
rampup:
|
||||
params:
|
||||
cl: <<write_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- rampup-insert: |
|
||||
insert into <<keyspace:baselines>>.<<table:tabular>>
|
||||
(part,clust,data0,data1,data2,data3,data4,data5,data6,data7)
|
||||
values ({part_layout},{clust_layout},{data0},{data1},{data2},{data3},{data4},{data5},{data6},{data7})
|
||||
tags:
|
||||
name: rampup-insert
|
||||
- name: verify
|
||||
tags:
|
||||
phase: verify
|
||||
type: read
|
||||
cl: TEMPLATE(write_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
rampup-insert: |
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular)
|
||||
(part,clust,data0,data1,data2,data3,data4,data5,data6,data7)
|
||||
values ({part_layout},{clust_layout},{data0},{data1},{data2},{data3},{data4},{data5},{data6},{data7})
|
||||
verify:
|
||||
params:
|
||||
cl: <<read_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- verify-select: |
|
||||
select * from <<keyspace:baselines>>.<<table:tabular>> where part={part_layout} and clust={clust_layout}
|
||||
tags:
|
||||
name: verify-select
|
||||
- name: main-read
|
||||
tags:
|
||||
phase: main
|
||||
type: read
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
verify-select: |
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_layout} and clust={clust_layout}
|
||||
main-read:
|
||||
params:
|
||||
ratio: 1
|
||||
cl: <<read_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- main-select-all: |
|
||||
select * from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
|
||||
tags:
|
||||
name: main-select-01
|
||||
- main-select-01: |
|
||||
select data0,data1 from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
|
||||
tags:
|
||||
name: main-select-0246
|
||||
- main-select-0246: |
|
||||
select data0,data2,data4,data6 from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
|
||||
tags:
|
||||
name: main-select-1357
|
||||
- main-select-1357: |
|
||||
select data1,data3,data5,data7 from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
|
||||
tags:
|
||||
name: main-select-0123
|
||||
- main-select-0123: |
|
||||
select data0,data1,data2,data3 from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
|
||||
tags:
|
||||
name: main-select-4567
|
||||
- main-select-4567: |
|
||||
select data4,data5,data6,data7 from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
|
||||
tags:
|
||||
name: main-select-01234567
|
||||
- main-select: |
|
||||
select data0,data1,data2,data3,data4,data5,data6,data7 from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
|
||||
tags:
|
||||
name: main-select
|
||||
- name: main-write
|
||||
tags:
|
||||
phase: main
|
||||
type: write
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
main-select-all: |
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-select-01: |
|
||||
select data0,data1 from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-select-0246: |
|
||||
select data0,data2,data4,data6 from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-select-1357: |
|
||||
select data1,data3,data5,data7 from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-select-0123: |
|
||||
select data0,data1,data2,data3 from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-select-4567: |
|
||||
select data4,data5,data6,data7 from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-select-67: |
|
||||
select data6,data7 from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-select: |
|
||||
select data0,data1,data2,data3,data4,data5,data6,data7 from TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular) where part={part_read} limit {limit};
|
||||
main-write:
|
||||
params:
|
||||
ratio: 8
|
||||
cl: <<write_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- main-write: |
|
||||
insert into <<keyspace:baselines>>.<<table:tabular>>
|
||||
(part, clust, data0,data1,data2,data3,data4,data5,data6,data7)
|
||||
values ({part_write},{clust_write},{data0},{data1},{data2},{data3},{data4},{data5},{data6},{data7})
|
||||
tags:
|
||||
name: main-write
|
||||
|
||||
cl: TEMPLATE(write_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
main-write: |
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,tabular)
|
||||
(part, clust, data0,data1,data2,data3,data4,data5,data6,data7)
|
||||
values ({part_write},{clust_write},{data0},{data1},{data2},{data3},{data4},{data5},{data6},{data7})
|
||||
|
@ -1,138 +1,117 @@
|
||||
# nb -v run driver=cql yaml=cql-iot tags=phase:schema host=dsehost
|
||||
min_version: "4.17.15"
|
||||
|
||||
description: |
|
||||
This workload emulates a time-series data model and access patterns.
|
||||
|
||||
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)
|
||||
|
||||
bindings:
|
||||
machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID
|
||||
machine_id: Mod(TEMPLATE(sources,10000)); ToHashedUUID() -> java.util.UUID
|
||||
sensor_name: HashedLineToString('data/variable_words.txt')
|
||||
time: Mul(<<timespeed:100>>L); Div(<<sources:10000>>L); ToDate()
|
||||
cell_timestamp: Mul(<<timespeed:100>>L); Div(<<sources:10000>>L); Mul(1000L)
|
||||
time: Mul(TEMPLATE(timespeed,100)L); Div(TEMPLATE(sources,10000)L); ToDate()
|
||||
cell_timestamp: Mul(TEMPLATE(timespeed,100)L); Div(TEMPLATE(sources,10000)L); Mul(1000L)
|
||||
sensor_value: Normal(0.0,5.0); Add(100.0) -> double
|
||||
station_id: Div(<<sources:10000>>);Mod(<<stations:100>>); ToHashedUUID() -> java.util.UUID
|
||||
station_id: Div(TEMPLATE(sources,10000));Mod(TEMPLATE(stations,100)); ToHashedUUID() -> java.util.UUID
|
||||
data: HashedFileExtractToString('data/lorem_ipsum_full.txt',800,1200)
|
||||
blocks:
|
||||
- tags:
|
||||
phase: schema
|
||||
schema:
|
||||
params:
|
||||
prepared: false
|
||||
statements:
|
||||
- create-keyspace: |
|
||||
create keyspace if not exists <<keyspace:baselines>>
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'}
|
||||
AND durable_writes = true;
|
||||
tags:
|
||||
name: create-keyspace
|
||||
- create-table : |
|
||||
create table if not exists <<keyspace:baselines>>.<<table:iot>> (
|
||||
machine_id UUID, // source machine
|
||||
sensor_name text, // sensor name
|
||||
time timestamp, // timestamp of collection
|
||||
sensor_value double, //
|
||||
station_id UUID, // source location
|
||||
data text,
|
||||
PRIMARY KEY ((machine_id, sensor_name), time)
|
||||
) WITH CLUSTERING ORDER BY (time DESC)
|
||||
AND compression = { 'sstable_compression' : '<<compression:LZ4Compressor>>' }
|
||||
AND compaction = {
|
||||
'class': 'TimeWindowCompactionStrategy',
|
||||
'compaction_window_size': <<expiry_minutes:60>>,
|
||||
'compaction_window_unit': 'MINUTES'
|
||||
};
|
||||
tags:
|
||||
name: create-table
|
||||
- truncate-table: |
|
||||
truncate table <<keyspace:baselines>>.<<table:iot>>;
|
||||
tags:
|
||||
name: truncate-table
|
||||
- tags:
|
||||
phase: schema-astra
|
||||
ops:
|
||||
create-keyspace: |
|
||||
create keyspace if not exists TEMPLATE(keyspace,baselines)
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 'TEMPLATE(rf,1)'}
|
||||
AND durable_writes = true;
|
||||
create-table: |
|
||||
create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,iot) (
|
||||
machine_id UUID, // source machine
|
||||
sensor_name text, // sensor name
|
||||
time timestamp, // timestamp of collection
|
||||
sensor_value double, //
|
||||
station_id UUID, // source location
|
||||
data text,
|
||||
PRIMARY KEY ((machine_id, sensor_name), time)
|
||||
) WITH CLUSTERING ORDER BY (time DESC)
|
||||
AND compression = { 'sstable_compression' : 'TEMPLATE(compression,LZ4Compressor)' }
|
||||
AND compaction = {
|
||||
'class': 'TimeWindowCompactionStrategy',
|
||||
'compaction_window_size': TEMPLATE(expiry_minutes,60),
|
||||
'compaction_window_unit': 'MINUTES'
|
||||
};
|
||||
truncate-table: |
|
||||
truncate table TEMPLATE(keyspace,baselines).TEMPLATE(table,iot);
|
||||
schema-astra:
|
||||
params:
|
||||
prepared: false
|
||||
statements:
|
||||
- create-table-astra : |
|
||||
create table if not exists <<keyspace:baselines>>.<<table:iot>> (
|
||||
machine_id UUID, // source machine
|
||||
sensor_name text, // sensor name
|
||||
time timestamp, // timestamp of collection
|
||||
sensor_value double, //
|
||||
station_id UUID, // source location
|
||||
data text,
|
||||
PRIMARY KEY ((machine_id, sensor_name), time)
|
||||
) WITH CLUSTERING ORDER BY (time DESC);
|
||||
tags:
|
||||
name: create-table-astra
|
||||
- tags:
|
||||
phase: rampup
|
||||
ops:
|
||||
create-table-astra: |
|
||||
create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,iot) (
|
||||
machine_id UUID, // source machine
|
||||
sensor_name text, // sensor name
|
||||
time timestamp, // timestamp of collection
|
||||
sensor_value double, //
|
||||
station_id UUID, // source location
|
||||
data text,
|
||||
PRIMARY KEY ((machine_id, sensor_name), time)
|
||||
) WITH CLUSTERING ORDER BY (time DESC);
|
||||
rampup:
|
||||
params:
|
||||
cl: <<write_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- insert-rampup: |
|
||||
insert into <<keyspace:baselines>>.<<table:iot>>
|
||||
(machine_id, sensor_name, time, sensor_value, station_id, data)
|
||||
values ({machine_id}, {sensor_name}, {time}, {sensor_value}, {station_id}, {data})
|
||||
using timestamp {cell_timestamp}
|
||||
tags:
|
||||
name: insert-rampup
|
||||
params:
|
||||
idempotent: true
|
||||
instrument: TEMPLATE(instrument-writes,TEMPLATE(instrument,false))
|
||||
- tags:
|
||||
phase: verify
|
||||
type: read
|
||||
cl: TEMPLATE(write_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
insert-rampup: |
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,iot)
|
||||
(machine_id, sensor_name, time, sensor_value, station_id, data)
|
||||
values ({machine_id}, {sensor_name}, {time}, {sensor_value}, {station_id}, {data})
|
||||
using timestamp {cell_timestamp}
|
||||
params:
|
||||
idempotent: true
|
||||
instrument: TEMPLATE(instrument-writes,TEMPLATE(instrument,false))
|
||||
verify:
|
||||
type: read
|
||||
params:
|
||||
ratio: 1
|
||||
cl: <<read_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- select-verify: |
|
||||
select * from <<keyspace:baselines>>.<<table:iot>>
|
||||
where machine_id={machine_id} and sensor_name={sensor_name} and time={time};
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
select-verify: |
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,iot)
|
||||
where machine_id={machine_id} and sensor_name={sensor_name} and time={time};
|
||||
verify-fields: "*, -cell_timestamp"
|
||||
tags:
|
||||
name: select-verify
|
||||
params:
|
||||
instrument: TEMPLATE(instrument-reads,TEMPLATE(instrument,false))
|
||||
- tags:
|
||||
phase: main
|
||||
type: read
|
||||
params:
|
||||
instrument: TEMPLATE(instrument-reads,TEMPLATE(instrument,false))
|
||||
main-read:
|
||||
params:
|
||||
ratio: <<read_ratio:1>>
|
||||
cl: <<read_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- select-read: |
|
||||
select * from <<keyspace:baselines>>.<<table:iot>>
|
||||
where machine_id={machine_id} and sensor_name={sensor_name}
|
||||
limit <<limit:10>>
|
||||
tags:
|
||||
name: select-read
|
||||
params:
|
||||
instrument: TEMPLATE(instrument-reads,TEMPLATE(instrument,false))
|
||||
|
||||
- tags:
|
||||
phase: main
|
||||
type: write
|
||||
ratio: TEMPLATE(read_ratio,1)
|
||||
cl: TEMPLATE(read_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
select-read: |
|
||||
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,iot)
|
||||
where machine_id={machine_id} and sensor_name={sensor_name}
|
||||
limit TEMPLATE(limit,10)
|
||||
params:
|
||||
instrument: TEMPLATE(instrument-reads,TEMPLATE(instrument,false))
|
||||
main-write:
|
||||
type: write
|
||||
params:
|
||||
ratio: <<write_ratio:9>>
|
||||
cl: <<write_cl:LOCAL_QUORUM>>
|
||||
statements:
|
||||
- insert-main: |
|
||||
insert into <<keyspace:baselines>>.<<table:iot>>
|
||||
(machine_id, sensor_name, time, sensor_value, station_id, data)
|
||||
values ({machine_id}, {sensor_name}, {time}, {sensor_value}, {station_id}, {data})
|
||||
using timestamp {cell_timestamp}
|
||||
tags:
|
||||
name: insert-main
|
||||
ratio: TEMPLATE(write_ratio,9)
|
||||
cl: TEMPLATE(write_cl,LOCAL_QUORUM)
|
||||
ops:
|
||||
insert-main: |
|
||||
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,iot)
|
||||
(machine_id, sensor_name, time, sensor_value, station_id, data)
|
||||
values ({machine_id}, {sensor_name}, {time}, {sensor_value}, {station_id}, {data})
|
||||
using timestamp {cell_timestamp}
|
||||
params:
|
||||
instrument: TEMPLATE(instrument-writes,TEMPLATE(instrument,false))
|
||||
idempotent: true
|
||||
instrument: TEMPLATE(instrument-writes,TEMPLATE(instrument,false))
|
||||
idempotent: true
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user