###
### Stress test for stress_zipkin2.service_remote_service_index table
###
### Stress testing is done using the `cassandra-stress` tool
###
### For example
###  cqlsh -f zipkin2-test-schema.cql
###  cassandra-stress  user profile=remote_service_by_service-stress.yaml ops\(insert=1\) no-warmup duration=1m  -rate threads=4 throttle=50/s
###
### after a benchmark has been run with only writes, a mixed read-write benchmark can be run with
###  cassandra-stress  user profile=remote_service_by_service-stress.yaml ops\(insert=1,select=1,select_remote_services=1\) duration=1m  -rate threads=4 throttle=50/s

# Keyspace Name
keyspace: stress_zipkin2

# Table name
table: remote_service_by_service


### Column Distribution Specifications ###

columnspec:
  - name: service
    size: uniform(5..20)
    population: uniform(1..100)

  - name: remote_service
    size: uniform(5..20)
    population: uniform(1..100)


### Batch Ratio Distribution Specifications ###

insert:
  partitions: fixed(1)            # 1 partition key at a time inserts to model a message being generated
  select:  fixed(1)/1000
  batchtype: UNLOGGED             # Unlogged batches


#
# A set of basic queries
#
queries:
   select:
    cql: SELECT DISTINCT service FROM remote_service_by_service
    fields: samerow
   select_remote_services:
    cql: SELECT remote_service FROM remote_service_by_service WHERE service = ? LIMIT 1000
    fields: samerow
