mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
min_version: "5.17.1"
|
|
|
|
scenarios:
|
|
default:
|
|
schema: run driver=cql tags==block:schema cycles==UNDEF threads==1
|
|
rampup: run driver=cql tags==block:rampup cycles=TEMPLATE(rampup-cycles,100K) threads=auto
|
|
main: run driver=cql tags==block:"main" cycles===TEMPLATE(main-cycles,100K) threads=auto
|
|
|
|
bindings:
|
|
userid: Template('user-{}',ToString()); SaveString('userid');
|
|
interest: Template('interest-{}',ToString());
|
|
|
|
blocks:
|
|
schema:
|
|
ops:
|
|
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)
|
|
);
|
|
rampup:
|
|
ops:
|
|
insert-users: |
|
|
insert into TEMPLATE(keyspace,examples).users (userid) VALUES ({userid});
|
|
insert-interests: |
|
|
insert into TEMPLATE(keyspace,examples).interests(
|
|
interest, userid
|
|
) VALUES (
|
|
{interest}, {userid}
|
|
);
|
|
main:
|
|
ops:
|
|
read-user: |
|
|
select * from TEMPLATE(keyspace,examples).users
|
|
where userid={userid};
|
|
read interests: |
|
|
select * from TEMPLATE(keyspace,examples).interests
|
|
where interest={interest};
|