resolved more complicated merges

This commit is contained in:
MikeYaacoubStax 2023-02-21 15:42:20 -05:00
parent 90815e237d
commit 54e5428f8f
3 changed files with 66 additions and 53 deletions

View File

@ -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:
@ -43,8 +46,7 @@ blocks:
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
@ -56,6 +58,7 @@ blocks:
time timestamp,
PRIMARY KEY ((machine_id), time)
) WITH CLUSTERING ORDER BY (time DESC);
rampup:
params:
cl: <<write_cl:LOCAL_QUORUM>>
@ -63,7 +66,13 @@ blocks:
ops:
insert-rampup: |
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:
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};

View File

@ -21,6 +21,8 @@ blocks:
}
params:
readPreference: primary
tags:
name: rampup-insert
main-read:
params:

View File

@ -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:
@ -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
}
}
]
}