Files
nosqlbench/nb-adapters/adapter-cqld4/src/main/resources/activities/baselines/cql_tabular.yaml

90 lines
3.2 KiB
YAML
Raw Normal View History

2023-01-26 19:02:43 -06:00
min_version: "5.17.1"
2022-01-05 15:32:12 -06:00
description: A tabular workload with partitions, clusters, and data fields
scenarios:
default:
2023-01-26 19:02:43 -06:00
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
2022-01-05 15:32:12 -06:00
astra:
schema: run driver=cql tags==block:schema_astra threads==1 cycles==UNDEF
2023-01-26 19:02:43 -06:00
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
basic_check:
schema: run driver=cql tags==block:schema threads==1 cycles==UNDEF
rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10) threads=auto
main: run driver=cql tags==block:main-*.* cycles===TEMPLATE(main-cycles,10) threads=auto
2022-01-05 15:32:12 -06:00
bindings:
# for ramp-up and verify
part_layout: Div(<<partsize:1000000>>); ToString() -> String
clust_layout: Mod(<<partsize:1000000>>); ToString() -> String
data: HashedFileExtractToString('data/lorem_ipsum_full.txt',50,150)
# 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
# for write
part_write: Hash(); Uniform(0,<<partcount:100>>)->int; ToString() -> String
clust_write: Hash(); Add(1); Uniform(0,<<partsize:1000000>>)->int; ToString() -> String
data_write: Hash(); HashedFileExtractToString('data/lorem_ipsum_full.txt',50,150) -> String
blocks:
2023-01-26 19:02:43 -06:00
schema:
2022-01-05 15:32:12 -06:00
params:
prepared: false
2023-01-26 19:02:43 -06:00
ops:
2023-10-23 20:22:49 -05:00
create_keyspace: |
2022-01-05 15:32:12 -06:00
create keyspace if not exists <<keyspace:baselines>>
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'}
AND durable_writes = true;
2023-10-23 20:22:49 -05:00
create_table: |
2022-01-05 15:32:12 -06:00
create table if not exists <<keyspace:baselines>>.<<table:tabular>> (
part text,
clust text,
data text,
PRIMARY KEY (part,clust)
);
2023-10-23 20:22:49 -05:00
schema_astra:
2022-01-05 15:32:12 -06:00
params:
prepared: false
2023-01-26 19:02:43 -06:00
ops:
2023-10-23 20:22:49 -05:00
create_table: |
2022-01-05 15:32:12 -06:00
create table if not exists <<keyspace:baselines>>.<<table:tabular>> (
part text,
clust text,
data text,
PRIMARY KEY (part,clust)
);
2023-01-26 19:02:43 -06:00
rampup:
2022-01-05 15:32:12 -06:00
params:
cl: <<write_cl:LOCAL_QUORUM>>
2023-01-26 19:02:43 -06:00
ops:
2023-10-23 20:22:49 -05:00
rampup_insert: |
2022-01-05 15:32:12 -06:00
insert into <<keyspace:baselines>>.<<table:tabular>>
(part,clust,data)
values ({part_layout},{clust_layout},{data})
2023-01-26 19:02:43 -06:00
verify:
2022-01-05 15:32:12 -06:00
params:
cl: <<read_cl:LOCAL_QUORUM>>
2023-01-26 19:02:43 -06:00
ops:
2023-10-23 20:22:49 -05:00
verify_select: |
2023-01-26 19:02:43 -06:00
select * from <<keyspace:baselines>>.<<table:tabular>> where part={part_layout} and clust={clust_layout};
2023-10-23 20:22:49 -05:00
main_read:
2022-01-05 15:32:12 -06:00
params:
ratio: 5
cl: <<read_cl:LOCAL_QUORUM>>
2023-01-26 19:02:43 -06:00
ops:
2023-10-23 20:22:49 -05:00
main_select: |
2022-01-05 15:32:12 -06:00
select * from <<keyspace:baselines>>.<<table:tabular>> where part={part_read} limit {limit};
2023-01-26 19:02:43 -06:00
2023-10-23 20:22:49 -05:00
main_write:
2022-01-05 15:32:12 -06:00
params:
ratio: 5
cl: <<write_cl:LOCAL_QUORUM>>
2023-01-26 19:02:43 -06:00
ops:
2023-10-23 20:22:49 -05:00
main_write: |
2022-01-05 15:32:12 -06:00
insert into <<keyspace:baselines>>.<<table:tabular>>
(part, clust, data) values ({part_write},{clust_write},{data_write});