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