Last active
November 27, 2023 09:59
-
-
Save sbtourist/24a943d4905d9e50105422c2433a2804 to your computer and use it in GitHub Desktop.
largemessagesV2.yaml
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 key-value workload with small and large values to test large messages | |
bindings: | |
large_rw_key: TEMPLATE(keydist,Uniform(0,1000000000)); | |
large_rw_value: Hash(); TEMPLATE(valdist,Uniform(0,1000000000)); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,100000)TEMPLATE(addzeros,),TEMPLATE(maxtext,250000)TEMPLATE(addzeros,))); ToString(); | |
small_rw_key: TEMPLATE(keydist,Uniform(1000000001,2000000000)); | |
small_rw_value: Hash(); TEMPLATE(valdist,Uniform(0,1000000000)); CharBufImage('A-Za-z0-9 _|/',16000000,HashRange(TEMPLATE(mintext,50)TEMPLATE(addzeros,),TEMPLATE(maxtext,100)TEMPLATE(addzeros,))); ToString(); | |
global_rw_key: TEMPLATE(keydist,Uniform(0,2000000000)); | |
limit: Uniform(100,1000); | |
blocks: | |
- tags: | |
phase: schema | |
type: create-keyspace | |
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; | |
- tags: | |
phase: schema | |
type: create-table | |
params: | |
prepared: false | |
statements: | |
- create-table: | | |
create table if not exists TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalueV2) ( | |
key bigint, | |
value text, | |
PRIMARY KEY (key) | |
); | |
- tags: | |
phase: truncate | |
params: | |
prepared: false | |
statements: | |
- truncate-table: | | |
truncate table TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalueV2); | |
- tags: | |
phase: populate | |
params: | |
cl: TEMPLATE(write_cl,LOCAL_QUORUM) | |
statements: | |
- populate-insert: | | |
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalueV2) | |
(key, value) | |
values ({large_rw_key},{large_rw_value}); | |
- tags: | |
phase: main | |
type: read-single | |
params: | |
ratio: 0 | |
cl: TEMPLATE(read_cl,LOCAL_QUORUM) | |
statements: | |
- main-select: | | |
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalueV2) where key={global_rw_key}; | |
- tags: | |
phase: main | |
type: read-range-large | |
params: | |
ratio: 2 | |
cl: TEMPLATE(read_cl,LOCAL_QUORUM) | |
statements: | |
- main-select: | | |
select * from TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalueV2) where key > {large_rw_key} limit TEMPLATE(range_limit,{limit}) ALLOW FILTERING; | |
- tags: | |
phase: main | |
type: write-small | |
params: | |
ratio: 8 | |
cl: TEMPLATE(read_cl,LOCAL_QUORUM) | |
statements: | |
- main-insert: | | |
insert into TEMPLATE(keyspace,baselines).TEMPLATE(table,keyvalueV2) | |
(key, value) values ({small_rw_key}, {small_rw_value}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment