mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
resolved more complicated merges
This commit is contained in:
parent
90815e237d
commit
54e5428f8f
@ -1,5 +1,5 @@
|
|||||||
description: |
|
description: |
|
||||||
A cql-starter workload primarily for:
|
A cql-starter workload.
|
||||||
* Cassandra: 3.x, 4.x.
|
* Cassandra: 3.x, 4.x.
|
||||||
* DataStax Enterprise: 6.8.x.
|
* DataStax Enterprise: 6.8.x.
|
||||||
* DataStax Astra.
|
* DataStax Astra.
|
||||||
@ -7,8 +7,9 @@ description: |
|
|||||||
scenarios:
|
scenarios:
|
||||||
default:
|
default:
|
||||||
schema: run driver=cql tags==block:schema threads==1 cycles==UNDEF
|
schema: run driver=cql tags==block:schema threads==1 cycles==UNDEF
|
||||||
rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10) threads=auto
|
rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,1) threads=auto
|
||||||
main: run driver=cql tags==block:"main.*" cycles===TEMPLATE(main-cycles,10) threads=auto
|
main: run driver=cql tags==block:"main.*" cycles===TEMPLATE(main-cycles,10) threads=auto
|
||||||
|
# rampdown: run driver=cql tags==block:rampdown threads==1 cycles==UNDEF
|
||||||
astra:
|
astra:
|
||||||
schema: run driver=cql tags==block:schema-astra threads==1 cycles==UNDEF
|
schema: run driver=cql tags==block:schema-astra threads==1 cycles==UNDEF
|
||||||
rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10) threads=auto
|
rampup: run driver=cql tags==block:rampup cycles===TEMPLATE(rampup-cycles,10) threads=auto
|
||||||
@ -19,13 +20,15 @@ scenarios:
|
|||||||
main: run driver=cql tags==block:"main.*" cycles===TEMPLATE(main-cycles,10) threads=auto
|
main: run driver=cql tags==block:"main.*" cycles===TEMPLATE(main-cycles,10) threads=auto
|
||||||
|
|
||||||
params:
|
params:
|
||||||
x: y
|
a_param: "value"
|
||||||
|
|
||||||
bindings:
|
bindings:
|
||||||
machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID
|
machine_id: ElapsedNanoTime(); ToHashedUUID() -> java.util.UUID
|
||||||
message: ToString(); TextOfFile('data/cql-starter-message.txt')
|
message: Discard(); TextOfFile('data/cql-starter-message.txt');
|
||||||
time: Mul(100L); Div(10000L); ToJavaInstant()
|
rampup_message: ToString();
|
||||||
timestamp: Mul(<<timespeed:100>>L); Div(<<sources:10000>>L); Mul(1000L);
|
time: ElapsedNanoTime(); Mul(1000); ToJavaInstant();
|
||||||
|
ts: ElapsedNanoTime(); Mul(1000);
|
||||||
|
|
||||||
|
|
||||||
blocks:
|
blocks:
|
||||||
schema:
|
schema:
|
||||||
@ -38,32 +41,38 @@ blocks:
|
|||||||
AND durable_writes = true;
|
AND durable_writes = true;
|
||||||
create-table: |
|
create-table: |
|
||||||
create table if not exists <<keyspace:starter>>.<<table:cqlstarter>> (
|
create table if not exists <<keyspace:starter>>.<<table:cqlstarter>> (
|
||||||
machine_id UUID,
|
machine_id UUID,
|
||||||
message text,
|
message text,
|
||||||
time timestamp,
|
time timestamp,
|
||||||
PRIMARY KEY ((machine_id), time)
|
PRIMARY KEY ((machine_id), time)
|
||||||
) WITH CLUSTERING ORDER BY (time DESC);
|
) WITH CLUSTERING ORDER BY (time DESC);
|
||||||
# truncate-table: |
|
|
||||||
# truncate table <<keyspace:starter>>.<<table:cqlstarter>>;
|
|
||||||
schema-astra:
|
schema-astra:
|
||||||
params:
|
params:
|
||||||
prepared: false
|
prepared: false
|
||||||
ops:
|
ops:
|
||||||
create-table-astra: |
|
create-table-astra: |
|
||||||
create table if not exists <<keyspace:starter>>.<<table:cqlstarter>> (
|
create table if not exists <<keyspace:starter>>.<<table:cqlstarter>> (
|
||||||
machine_id UUID,
|
machine_id UUID,
|
||||||
message text,
|
message text,
|
||||||
time timestamp,
|
time timestamp,
|
||||||
PRIMARY KEY ((machine_id), time)
|
PRIMARY KEY ((machine_id), time)
|
||||||
) WITH CLUSTERING ORDER BY (time DESC);
|
) WITH CLUSTERING ORDER BY (time DESC);
|
||||||
|
|
||||||
rampup:
|
rampup:
|
||||||
params:
|
params:
|
||||||
cl: <<write_cl:LOCAL_QUORUM>>
|
cl: <<write_cl:LOCAL_QUORUM>>
|
||||||
idempotent: true
|
idempotent: true
|
||||||
ops:
|
ops:
|
||||||
insert-rampup: |
|
insert-rampup: |
|
||||||
insert into <<keyspace:starter>>.<<table:cqlstarter>> (machine_id, message, time)
|
insert into <<keyspace:starter>>.<<table:cqlstarter>> (machine_id, message, time)
|
||||||
values ({machine_id}, {message}, {time}) using timestamp {timestamp};
|
values ({machine_id}, {rampup_message}, {time}) using timestamp {ts};
|
||||||
|
|
||||||
|
rampdown:
|
||||||
|
ops:
|
||||||
|
truncate-table: |
|
||||||
|
truncate table <<keyspace:starter>>.<<table:cqlstarter>>;
|
||||||
|
|
||||||
main-read:
|
main-read:
|
||||||
params:
|
params:
|
||||||
ratio: <<read_ratio:1>>
|
ratio: <<read_ratio:1>>
|
||||||
@ -80,4 +89,4 @@ blocks:
|
|||||||
ops:
|
ops:
|
||||||
insert-main: |
|
insert-main: |
|
||||||
insert into <<keyspace:starter>>.<<table:cqlstarter>>
|
insert into <<keyspace:starter>>.<<table:cqlstarter>>
|
||||||
(machine_id, message, time) values ({machine_id}, {message}, {time}) using timestamp {timestamp};
|
(machine_id, message, time) values ({machine_id}, {message}, {time}) using timestamp {ts};
|
@ -15,12 +15,14 @@ blocks:
|
|||||||
rampup:
|
rampup:
|
||||||
ops:
|
ops:
|
||||||
rampup-insert: |
|
rampup-insert: |
|
||||||
{
|
{
|
||||||
insert: "<<collection:keyvalue>>",
|
insert: "<<collection:keyvalue>>",
|
||||||
documents: [ { _id: {seq_key}, value: {seq_value} } ]
|
documents: [ { _id: {seq_key}, value: {seq_value} } ]
|
||||||
}
|
}
|
||||||
params:
|
params:
|
||||||
readPreference: primary
|
readPreference: primary
|
||||||
|
tags:
|
||||||
|
name: rampup-insert
|
||||||
|
|
||||||
main-read:
|
main-read:
|
||||||
params:
|
params:
|
||||||
@ -32,7 +34,7 @@ blocks:
|
|||||||
{
|
{
|
||||||
find: "<<collection:keyvalue>>",
|
find: "<<collection:keyvalue>>",
|
||||||
filter: { _id: {rw_key} }
|
filter: { _id: {rw_key} }
|
||||||
}
|
}
|
||||||
|
|
||||||
main-write:
|
main-write:
|
||||||
params:
|
params:
|
||||||
@ -40,9 +42,9 @@ blocks:
|
|||||||
type: write
|
type: write
|
||||||
ops:
|
ops:
|
||||||
main-insert: |
|
main-insert: |
|
||||||
{
|
{
|
||||||
insert: "<<collection:keyvalue>>",
|
insert: "<<collection:keyvalue>>",
|
||||||
documents: [ { _id: {rw_key}, value: {rw_value} } ]
|
documents: [ { _id: {rw_key}, value: {rw_value} } ]
|
||||||
}
|
}
|
||||||
params:
|
params:
|
||||||
readPreference: primary
|
readPreference: primary
|
@ -32,7 +32,6 @@ bindings:
|
|||||||
|
|
||||||
match1: Identity(); CoinFunc(<<match-ratio>>, FixedValue(0), FixedValue(1000))
|
match1: Identity(); CoinFunc(<<match-ratio>>, FixedValue(0), FixedValue(1000))
|
||||||
match2: Identity(); CoinFunc(<<match-ratio>>, FixedValue("true"), FixedValue("false"))
|
match2: Identity(); CoinFunc(<<match-ratio>>, FixedValue("true"), FixedValue("false"))
|
||||||
# Being removed because we are using the new JSON structure
|
|
||||||
additional_fields: ListSizedStepped(<<docpadding:0>>,Template("\"{}\":{}",Identity(),Identity())); ToString(); ReplaceAll('\[\"', ',\"'); ReplaceAll('\[', ''); ReplaceAll('\]', '') -> String
|
additional_fields: ListSizedStepped(<<docpadding:0>>,Template("\"{}\":{}",Identity(),Identity())); ToString(); ReplaceAll('\[\"', ',\"'); ReplaceAll('\[', ''); ReplaceAll('\]', '') -> String
|
||||||
|
|
||||||
blocks:
|
blocks:
|
||||||
@ -47,12 +46,12 @@ blocks:
|
|||||||
drop-collection: |
|
drop-collection: |
|
||||||
{
|
{
|
||||||
drop: "<<collection:search_basic>>"
|
drop: "<<collection:search_basic>>"
|
||||||
}
|
}
|
||||||
|
|
||||||
create-collection: |
|
create-collection: |
|
||||||
{
|
{
|
||||||
create: "<<collection:search_basic>>"
|
create: "<<collection:search_basic>>"
|
||||||
}
|
}
|
||||||
|
|
||||||
create-indexes: |
|
create-indexes: |
|
||||||
{
|
{
|
||||||
@ -84,9 +83,9 @@ blocks:
|
|||||||
{
|
{
|
||||||
"_id": "{seq_key}",
|
"_id": "{seq_key}",
|
||||||
"user_id": "{user_id}",
|
"user_id": "{user_id}",
|
||||||
"created_on": "{created_on}",
|
"created_on": {created_on},
|
||||||
"full_name": "{full_name}",
|
"full_name": "{full_name}",
|
||||||
"married": "{married}",
|
"married": {married},
|
||||||
"address": {
|
"address": {
|
||||||
"primary": {
|
"primary": {
|
||||||
"city": "{city}",
|
"city": "{city}",
|
||||||
@ -95,17 +94,20 @@ blocks:
|
|||||||
"secondary": {}
|
"secondary": {}
|
||||||
},
|
},
|
||||||
"coordinates": [
|
"coordinates": [
|
||||||
"{lat}",
|
{lat},
|
||||||
"{lng}"
|
{lng}
|
||||||
],
|
],
|
||||||
"children": [],
|
"children": [],
|
||||||
"friends": [
|
"friends": [
|
||||||
"{friend_id}"
|
"{friend_id}"
|
||||||
],
|
],
|
||||||
"debt": null,
|
"debt": null,
|
||||||
"match1": "{match1}",
|
"match1": {match1},
|
||||||
"match2": "{match2}",
|
"match2": "{match2}",
|
||||||
"match3": "{match2}"
|
"match3": {match2},
|
||||||
|
{
|
||||||
|
additional_fields
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -124,20 +126,20 @@ blocks:
|
|||||||
filter: eq
|
filter: eq
|
||||||
ops:
|
ops:
|
||||||
read-document: |
|
read-document: |
|
||||||
{
|
{
|
||||||
find: "<<collection:search_basic>>",
|
find: "<<collection:search_basic>>",
|
||||||
filter: { match3: true }
|
filter: { match3: true }
|
||||||
}, <<field-projection:null>>
|
}, <<field-projection:null>>
|
||||||
|
|
||||||
main-lt:
|
main-lt:
|
||||||
params:
|
params:
|
||||||
filter: lt
|
filter: lt
|
||||||
ops:
|
ops:
|
||||||
read-document: |
|
read-document: |
|
||||||
{
|
{
|
||||||
find: "<<collection:search_basic>>",
|
find: "<<collection:search_basic>>",
|
||||||
filter: { match1: {$lt: 1}}
|
filter: { match1: {$lt: 1}}
|
||||||
}, <<field-projection:null>>
|
}, <<field-projection:null>>
|
||||||
|
|
||||||
main-and:
|
main-and:
|
||||||
params:
|
params:
|
||||||
@ -147,17 +149,17 @@ blocks:
|
|||||||
{
|
{
|
||||||
find: "<<collection:search_basic>>",
|
find: "<<collection:search_basic>>",
|
||||||
filter: { match1: {$lt: 1}, match2: "true"}
|
filter: { match1: {$lt: 1}, match2: "true"}
|
||||||
}, <<field-projection:null>>
|
}, <<field-projection:null>>
|
||||||
|
|
||||||
main-or:
|
main-or:
|
||||||
params:
|
params:
|
||||||
filter: or
|
filter: or
|
||||||
ops:
|
ops:
|
||||||
read-document: |
|
read-document: |
|
||||||
{
|
{
|
||||||
find: "<<collection:search_basic>>",
|
find: "<<collection:search_basic>>",
|
||||||
filter: { $or: [ {match1: {$lt: 1}}, {match3: true}]}
|
filter: { $or: [ {match1: {$lt: 1}}, {match3: true}]}
|
||||||
}, <<field-projection:null>>
|
}, <<field-projection:null>>
|
||||||
|
|
||||||
main-or-single-match:
|
main-or-single-match:
|
||||||
params:
|
params:
|
||||||
@ -167,4 +169,4 @@ blocks:
|
|||||||
{
|
{
|
||||||
find: "<<collection:search_basic>>",
|
find: "<<collection:search_basic>>",
|
||||||
filter: { $or: [ {match1: {$lt: 1}}, {match2: "notamatch"}]}
|
filter: { $or: [ {match1: {$lt: 1}}, {match2: "notamatch"}]}
|
||||||
}, <<field-projection:null>>
|
}, <<field-projection:null>>
|
Loading…
Reference in New Issue
Block a user