mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
refactor command parsing for consistency and clarity
This commit is contained in:
@@ -93,6 +93,7 @@ blocks:
|
||||
name: select-read
|
||||
params:
|
||||
instrument: TEMPLATE(instrument-reads,TEMPLATE(instrument,false))
|
||||
|
||||
- tags:
|
||||
phase: main
|
||||
type: write
|
||||
|
||||
54
activitytype-cql/src/main/resources/examples/cql-rowops.yaml
Normal file
54
activitytype-cql/src/main/resources/examples/cql-rowops.yaml
Normal file
@@ -0,0 +1,54 @@
|
||||
scenarios:
|
||||
default:
|
||||
schema: run driver=cql tags==phase:schema cycles==UNDEF threads==1
|
||||
rampup: run driver=cql tags==phase:rampup cycles=TEMPLATE(rampup-cycles100K) threads=auto
|
||||
|
||||
bindings:
|
||||
userid: Template('user-{}',ToString()); SaveString('userid');
|
||||
interest: Template('interest-{}',ToString());
|
||||
|
||||
blocks:
|
||||
- name: schema
|
||||
tags:
|
||||
phase: schema
|
||||
statements:
|
||||
- create-keyspace: |
|
||||
create KEYSPACE if not exists TEMPLATE(keyspace,examples)
|
||||
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}
|
||||
AND durable_writes = 'true';
|
||||
- create-users-table: |
|
||||
create table if not exists TEMPLATE(keyspace,examples).users (
|
||||
userid text PRIMARY KEY
|
||||
);
|
||||
- create-interests-table: |
|
||||
create table if not exists TEMPLATE(keyspace,examples).interests (
|
||||
userid text,
|
||||
interest text,
|
||||
primary key (interest, userid)
|
||||
);
|
||||
- name: rampup
|
||||
tags:
|
||||
phase: rampup
|
||||
statements:
|
||||
- insert-users: |
|
||||
insert into TEMPLATE(keyspace,examples).users (userid) VALUES ({userid});
|
||||
tags:
|
||||
entity: users
|
||||
- insert-interests: |
|
||||
insert into TEMPLATE(keyspace,examples).interests(
|
||||
interest, userid
|
||||
) VALUES (
|
||||
{interest}, {userid}
|
||||
);
|
||||
tags:
|
||||
entity: interests
|
||||
- name: main
|
||||
tags:
|
||||
phase: main
|
||||
statements:
|
||||
- read-user: |
|
||||
select * from TEMPLATE(keyspace,examples).users
|
||||
where userid={userid};
|
||||
- read interests: |
|
||||
select * from TEMPLATE(keyspace,examples).interests
|
||||
where interest={interest};
|
||||
Reference in New Issue
Block a user