Last active
May 19, 2023 10:34
-
-
Save sbtourist/b2c47546dbbdeb33a12cf5796141f945 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description: | | |
A workload with text keys, ~1kb text values and SAI. | |
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 | |
bindings: | |
seq_key: Mod(TEMPLATE(keycount,1000000000)); ToString(); | |
seq_value: >- | |
Hash(); | |
Mod(TEMPLATE(valuecount,1000000000)); | |
CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,100000)TEMPLATE(addzeroes,),TEMPLATE(maxtext,500000)TEMPLATE(addzeroes,))); | |
ToString(); | |
rw_key: TEMPLATE(keydist,Uniform(0,1000000000)); ToString() -> String | |
rw_value: Hash(); TEMPLATE(valdist,Uniform(0,1000000000)); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,500)TEMPLATE(addzeros,),TEMPLATE(maxtext,1500)TEMPLATE(addzeros,))); ToString(); | |
blocks: | |
- tags: | |
phase: schema | |
params: | |
prepared: false | |
statements: | |
- create-keyspace: | | |
create keyspace if not exists TEMPLATE(keyspace,baselines) | |
WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': 'TEMPLATE(rf,3)'} | |
AND durable_writes = true; | |
- create-table: | | |
create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) ( | |
key text, | |
value text, | |
PRIMARY KEY (key) | |
); | |
- create-index: | | |
create index if not exists test_index on TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) (value) | |
- truncate-table: | | |
truncate table TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue); | |
- tags: | |
phase: rampup | |
params: | |
cl: TEMPLATE(write_cl,LOCAL_QUORUM) | |
statements: | |
- rampup-insert: | | |
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) | |
(key, value) | |
values ({seq_key},{seq_value}); | |
- tags: | |
phase: verify | |
params: | |
cl: TEMPLATE(read_cl,LOCAL_QUORUM) | |
statements: | |
- verify-select: | | |
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalue) where key={seq_key}; | |
verify-fields: key->seq_key, value->seq_value | |
- tags: | |
phase: main | |
type: 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}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment