Skip to content

Commit

Permalink
update stress profiles for new span_name_by_service tables
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsembwever committed Nov 3, 2016
1 parent 274c0be commit 260fefd
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ CREATE TABLE IF NOT EXISTS zipkin3.traces (
duration bigint,
annotations list<frozen<annotation>>,
binary_annotations list<frozen<binary_annotation>>,
all_annotations text, // can't do SASI on set<text>: comma-joined until CASSANDRA-11182
all_annotations text, //-- can't do SASI on set<text>: comma-joined until CASSANDRA-11182
PRIMARY KEY (trace_id, ts_uuid, id)
)
WITH CLUSTERING ORDER BY (ts_uuid DESC)
Expand All @@ -39,12 +39,12 @@ CREATE TABLE IF NOT EXISTS zipkin3.traces (


CREATE TABLE zipkin3.trace_by_service_span (
service_name text, // service name
span_name text, // span name, or blank for queries without span name
bucket int, // time bucket, calculated as ts/interval (in microseconds), for some pre-configured interval like 1 day.
ts timeuuid, // start timestamp of the span, truncated to millisecond precision
trace_id varint, // trace ID
duration bigint, // span duration, in microseconds
service_name text, //-- service name
span_name text, //-- span name, or blank for queries without span name
bucket int, //-- time bucket, calculated as ts/interval (in microseconds), for some pre-configured interval like 1 day.
ts timeuuid, //-- start timestamp of the span, truncated to millisecond precision
trace_id varint, //-- trace ID
duration bigint, //-- span duration, in microseconds
PRIMARY KEY ((service_name, span_name, bucket), ts)
)
WITH CLUSTERING ORDER BY (ts DESC)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright 2015-2016 The OpenZipkin Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
# in compliance with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under
# the License.
#
###
### Stress test for zipkin3 service_span_name_index table
###
### Stress testing is done using the `cassandra-stress` tool
###
### For example
### cassandra-stress user profile=span_name_by_service-stress.yaml ops\(insert=1\) 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=span_name_by_service-stress.yaml ops\(insert=1,select=1,select_span_names=1\) duration=1m -rate threads=4 throttle=50/s

# Keyspace Name
keyspace: zipkin3

# Table name
table: span_name_by_service


### Column Distribution Specifications ###

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

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


### Batch Ratio Distribution Specifications ###

insert:
partitions: fixed(1) # 1 pertition 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_name FROM span_name_by_service
fields: samerow
select_span_names:
cql: SELECT span_name FROM span_name_by_service WHERE service_name = ? LIMIT 1000
fields: samerow

0 comments on commit 260fefd

Please sign in to comment.