Skip to content

Instantly share code, notes, and snippets.

@vichu
Last active July 1, 2022 17:51
Show Gist options
  • Save vichu/f31db903f7c2703d1fa8e10b47d09bce to your computer and use it in GitHub Desktop.
Save vichu/f31db903f7c2703d1fa8e10b47d09bce to your computer and use it in GitHub Desktop.
# Keyspace Name
keyspace: keyspace_to_load_test
# The CQL for creating a keyspace (optional if it already exists)
keyspace_definition: |
CREATE KEYSPACE keyspace_to_load_test with replication = {'class': 'SimpleStrategy', 'replication_factor' : '3'}
# Table name
table: table_to_load_test
# The CQL for creating a table you wish to stress (optional if it already exists)
table_definition: |
CREATE TABLE table_to_load_test (
id uuid,
column1 text,
column2 int,
PRIMARY KEY((id), column1))
### Column Distribution Specifications ###
columnspec:
- name: id
population: GAUSSIAN(1..1000000, 500000, 15) # Normal distribution to mimic the production load
- name: column1
size: uniform(5..20) # Anywhere from 5 characters to 20 characters
cluster: fixed(5) #Assuming that we would be having 5 distinct carriers
- name: column2
size: uniform(100..500) # Anywhere from 5 characters to 20 characters
### Batch Ratio Distribution Specifications ###
insert:
partitions: fixed(1) # We are just going to be touching single partiton with an insert
select: fixed(1)/5 # We would want to update 1/5th of the rows in the partition at any given time
batchtype: UNLOGGED # No batched inserts
#
# A list of queries you wish to run against the schema
#
queries:
queryForUseCase:
cql: select * from table_to_load_test where id = ? and column1 = ?
fields: samerow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment