fixing operation syntax

fixing port/host names per api

equivalent changes to new docs API tests

example of using cql driver, but missing contact points and local dc

schema creation via API

minor fixes to rest workloads

create schema via REST API

todos and workarounds

final test changes

removing unneeded files

removing unneeded files
This commit is contained in:
Jeffrey Carpenter 2022-12-16 08:04:23 -07:00
parent 98493cfcb8
commit 72dd19cb2a
14 changed files with 433 additions and 350 deletions

View File

@ -15,10 +15,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: restapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: restapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: restapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<restapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -31,7 +31,8 @@ blocks:
schema: schema:
ops: ops:
create-keyspace: create-keyspace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -41,15 +42,19 @@ blocks:
"name": "<<keyspace:baselines>>", "name": "<<keyspace:baselines>>",
"replicas": <<rf:1>> "replicas": <<rf:1>>
} }
drop-table: drop-table:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables/<<table:keyvalue>> method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables/<<table:keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
create-table: create-table:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -74,10 +79,12 @@ blocks:
}, },
"ifNotExists": true "ifNotExists": true
} }
schema-astra: schema-astra:
statements: statements:
create-table-astra: create-table-astra:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -102,10 +109,12 @@ blocks:
}, },
"ifNotExists": true "ifNotExists": true
} }
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -115,23 +124,27 @@ blocks:
"key": "{seq_key}", "key": "{seq_key}",
"value": "{seq_value}" "value": "{seq_value}"
} }
main-read: main-read:
params: params:
ratio: <<read_ratio:5>> ratio: <<read_ratio:5>>
ops: ops:
main-select: main-select:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>>/{rw_key} method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>>/{rw_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
main-write: main-write:
params: params:
ratio: <<write_ratio:5>> ratio: <<write_ratio:5>>
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -16,10 +16,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: restapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: restapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: restapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<restapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
# for ramp-up and verify # for ramp-up and verify
@ -39,7 +39,8 @@ blocks:
schema: schema:
ops: ops:
create-keyspace: create-keyspace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -49,43 +50,19 @@ blocks:
"name": "<<keyspace:baselines>>", "name": "<<keyspace:baselines>>",
"replicas": <<rf:1>> "replicas": <<rf:1>>
} }
drop-table:
method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables/<<table:tabular>>
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json"
ok-status: "[2-4][0-9][0-9]"
create-table: create-table:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables method: POST
Accept: "application/json" uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json"
body: |
{
"name": "<<table:tabular>>",
"columnDefinitions": [
{
"name": "part",
"typeDefinition": "text"
},
{
"name": "clust",
"typeDefinition": "text"
},
{
"name": "data",
"typeDefinition": "text"
}
],
"primaryKey": {
"partitionKey": [
"part"
],
"clusteringKey": [
"clust"
]
},
"ifNotExists": true
}
schema-astra:
ops:
create-table-astra:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -117,10 +94,12 @@ blocks:
}, },
"ifNotExists": true "ifNotExists": true
} }
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -131,22 +110,26 @@ blocks:
"clust": "{clust_layout}", "clust": "{clust_layout}",
"data": "{data}" "data": "{data}"
} }
main-read: main-read:
params: params:
ratio: 5 ratio: 5
ops: ops:
main-select: main-select:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>>/{part_read}&page-size={limit} method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>>/{part_read}&page-size={limit}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
main-write: main-write:
params: params:
ratio: 5 ratio: 5
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -20,10 +20,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: restapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: restapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: restapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<restapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -36,47 +36,91 @@ bindings:
blocks: blocks:
schema: schema:
params:
prepared: false
ops: ops:
create-keyspace: | create-keyspace:
create keyspace if not exists <<keyspace:baselines>> method: POST
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'} uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces
AND durable_writes = true; Accept: "application/json"
create-table: | X-Cassandra-Request-Id: "{request_id}"
create table if not exists <<keyspace:baselines>>.<<table:iot>> ( X-Cassandra-Token: "<<auth_token:my_auth_token>>"
machine_id UUID, // source machine Content-Type: "application/json"
sensor_name text, // sensor name body: |
time timestamp, // timestamp of collection {
sensor_value double, // "name": "<<keyspace:baselines>>",
station_id UUID, // source location "replicas": <<rf:1>>
data text, }
PRIMARY KEY ((machine_id, sensor_name), time)
) WITH CLUSTERING ORDER BY (time DESC) drop-table:
AND compression = { 'sstable_compression' : '<<compression:LZ4Compressor>>' } method: DELETE
AND compaction = { uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables/<<table:iot>>
'class': 'TimeWindowCompactionStrategy', Accept: "application/json"
'compaction_window_size': <<expiry_minutes:60>>, X-Cassandra-Request-Id: "{request_id}"
'compaction_window_unit': 'MINUTES' X-Cassandra-Token: "<<auth_token:my_auth_token>>"
}; Content-Type: "application/json"
truncate-table: | ok-status: "[2-4][0-9][0-9]"
truncate table <<keyspace:baselines>>.<<table:iot>>;
schema-astra: create-table:
ops: method: POST
create-table-astra: | uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables
create table if not exists <<keyspace:baselines>>.<<table:iot>> ( Accept: "application/json"
machine_id UUID, // source machine X-Cassandra-Request-Id: "{request_id}"
sensor_name text, // sensor name X-Cassandra-Token: "<<auth_token:my_auth_token>>"
time timestamp, // timestamp of collection Content-Type: "application/json"
sensor_value double, // body: |
station_id UUID, // source location {
data text, "name": "<<table:iot>>",
PRIMARY KEY ((machine_id, sensor_name), time) "columnDefinitions": [
) WITH CLUSTERING ORDER BY (time DESC); {
"name": "machine_id",
"typeDefinition": "uuid"
},
{
"name": "sensor_name",
"typeDefinition": "text"
},
{
"name": "time",
"typeDefinition": "timestamp"
},
{
"name": "sensor_value",
"typeDefinition": "double"
},
{
"name": "station_id",
"typeDefinition": "uuid"
},
{
"name": "data",
"typeDefinition": "text"
}
],
"primaryKey": {
"partitionKey": [
"machine_id",
"sensor_name"
],
"clusteringKey": [
"time"
]
},
"tableOptions": {
"clusteringExpression": [
{
"column": "time",
"order": "DESC"
}
]
},
"ifNotExists": true
}
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:iot>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:iot>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -90,22 +134,26 @@ blocks:
"station_id": "{station_id}", "station_id": "{station_id}",
"data": "{data}" "data": "{data}"
} }
main-read: main-read:
params: params:
ratio: <<read_ratio:1>> ratio: <<read_ratio:1>>
ops: ops:
main-select: main-select:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:iot>>?where=E[[{"machine_id":{"$eq":"{machine_id}"},"sensor_name":{"$eq":"{sensor_name}"}}]]&page-size=<<limit:10>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:iot>>?where=URLENCODE[[{"machine_id":{"$eq":"{machine_id}"},"sensor_name":{"$eq":"{sensor_name}"}}]]&page-size=<<limit:10>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
main-write: main-write:
params: params:
ratio: <<write_ratio:9>> ratio: <<write_ratio:9>>
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:iot>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<restapi_port:8082>><<path_prefix:>>/v2/keyspaces/<<keyspace:baselines>>/<<table:iot>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -1,27 +1,27 @@
min_version: "4.17.15" min_version: "4.17.15"
# nb -v run driver=http yaml=http-docsapi-crud-basic tags=phase:schema stargate_host=my_stargate_host auth_token=$AUTH_TOKEN # nb -v run driver=http yaml=http-docsapi-crud-basic tags=phase:schema docsapi_host=my_docsapi_host auth_token=$AUTH_TOKEN
description: | description: |
This workload emulates CRUD operations for the Stargate Documents API. This workload emulates CRUD operations for the Stargate Documents API.
It generates a simple JSON document to be used for writes and updates. It generates a simple JSON document to be used for writes and updates.
Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180).
scenarios: scenarios:
default: default:
schema: run driver=http tags==block:schema threads==1 cycles==UNDEF schema: run driver=http tags==block:schema threads==1 cycles==UNDEF
write: run driver=http tags==name:"write.*" cycles===TEMPLATE(write-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn write: run driver=http tags==block:"write.*" cycles===TEMPLATE(write-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn
read: run driver=http tags==name:"read.*" cycles===TEMPLATE(read-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn read: run driver=http tags==block:"read.*" cycles===TEMPLATE(read-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn
update: run driver=http tags==name:"update.*" cycles===TEMPLATE(update-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn update: run driver=http tags==block:"update.*" cycles===TEMPLATE(update-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn
delete: run driver=http tags==name:"delete.*" cycles===TEMPLATE(delete-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn delete: run driver=http tags==block:"delete.*" cycles===TEMPLATE(delete-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: docsapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: docsapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: docsapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<docsapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -42,40 +42,45 @@ bindings:
blocks: blocks:
schema: schema:
ops: ops:
create-keyspace: create-namespace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/schemas/namespaces
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<keyspace:docs_crud_basic>>", "name": "<<namespace:docs_crud_basic>>",
"replicas": <<rf:1>> "replicas": <<rf:1>>
} }
ok-status: ".*"
delete-docs-collection: delete-docs-collection:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_basic>>/collections/<<table:docs_collection>> method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_basic>>/collections/<<collection:docs_collection>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
create-docs-collection: create-docs-collection:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_basic>>/collections uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_basic>>/collections
method: POST
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<table:docs_collection>>" "name": "<<collection:docs_collection>>"
} }
main: write:
ops: ops:
write-document: write-document:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_basic>>/collections/<<table:docs_collection>>/{seq_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_basic>>/collections/<<collection:docs_collection>>/{seq_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -105,15 +110,21 @@ blocks:
"debt": null "debt": null
} }
read:
ops:
read-document: read-document:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_basic>>/collections/<<table:docs_collection>>/{random_key} method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_basic>>/collections/<<collection:docs_collection>>/{random_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
update:
ops:
update-document: update-document:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_basic>>/collections/<<table:docs_collection>>/{random_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_basic>>/collections/<<collection:docs_collection>>/{random_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -143,8 +154,11 @@ blocks:
"debt": null "debt": null
} }
delete:
ops:
delete-document: delete-document:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_basic>>/collections/<<table:docs_collection>>/{seq_key} method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_basic>>/collections/<<collection:docs_collection>>/{seq_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -3,7 +3,7 @@ min_version: "4.17.15"
description: | description: |
This workload emulates CRUD operations for the Stargate Documents API. This workload emulates CRUD operations for the Stargate Documents API.
It requires a data set file, where each line is a single JSON document to be used for writes and updates. It requires a data set file, where each line is a single JSON document to be used for writes and updates.
Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180).
scenarios: scenarios:
default: default:
@ -16,10 +16,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: docsapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: docsapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: docsapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<docsapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -29,34 +29,38 @@ bindings:
blocks: blocks:
schema: schema:
ops: ops:
create-keyspace: create-namespace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/schemas/namespaces
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<keyspace:docs_crud_dataset>>", "name": "<<namespace:docs_crud_dataset>>",
"replicas": <<rf:1>> "replicas": <<rf:1>>
} }
ok-status: ".*"
delete-docs-collection: delete-docs-collection:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_dataset>>/collections/<<table:docs_collection>> method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_dataset>>/collections/<<collection:docs_collection>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
create-docs-collection: create-docs-collection:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_dataset>>/collections method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_dataset>>/collections
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<table:docs_collection>>" "name": "<<collection:docs_collection>>"
} }
main: main:
@ -64,7 +68,8 @@ blocks:
document_json: ModuloLineToString('<<dataset_file>>'); document_json: ModuloLineToString('<<dataset_file>>');
ops: ops:
write-document: write-document:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_dataset>>/collections/<<table:docs_collection>>/{seq_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_dataset>>/collections/<<collection:docs_collection>>/{seq_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -72,14 +77,17 @@ blocks:
body: "{document_json}" body: "{document_json}"
read-document: read-document:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_dataset>>/collections/<<table:docs_collection>>/{random_key} method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_dataset>>/collections/<<collection:docs_collection>>/{random_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
# TODO - what is the purpose of this? does it overwrite? is there a way to make sure it is actually overwriting existing documents?
update-document: update-document:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_dataset>>/collections/<<table:docs_collection>>/{random_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_dataset>>/collections/<<collection:docs_collection>>/{random_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -87,7 +95,8 @@ blocks:
body: "{document_json}" body: "{document_json}"
delete-document: delete-document:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_crud_dataset>>/collections/<<table:docs_collection>>/{seq_key} method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_crud_dataset>>/collections/<<collection:docs_collection>>/{seq_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -6,7 +6,7 @@ description: |
- Schema creation with the Docs API, we don't use cql because the Docs API is opinionated about schema. - Schema creation with the Docs API, we don't use cql because the Docs API is opinionated about schema.
- There is no instrumentation with the http driver. - There is no instrumentation with the http driver.
- There is no async mode with the http driver. - There is no async mode with the http driver.
Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180).
scenarios: scenarios:
default: default:
@ -17,10 +17,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: docsapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: docsapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: docsapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<docsapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -32,40 +32,45 @@ bindings:
blocks: blocks:
schema: schema:
ops: ops:
create-keyspace: create-namespace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/schemas/namespaces
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<keyspace:docs_keyvalue>>", "name": "<<namespace:docs_keyvalue>>",
"replicas": <<rf:1>> "replicas": <<rf:1>>
} }
ok-status: ".*"
delete-docs-collection: delete-docs-collection:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_keyvalue>>/collections/<<table:docs_collection>> method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_keyvalue>>/collections/<<collection:docs_collection>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
create-docs-collection: create-docs-collection:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_keyvalue>>/collections method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_keyvalue>>/collections
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<table:docs_collection>>" "name": "<<collection:docs_collection>>"
} }
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_keyvalue>>/collections/<<table:docs_collection>>/{seq_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_keyvalue>>/collections/<<collection:docs_collection>>/{seq_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -80,14 +85,16 @@ blocks:
ratio: <<read_ratio:5>> ratio: <<read_ratio:5>>
ops: ops:
main-select: main-select:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_keyvalue>>/collections/<<table:docs_collection>>/{rw_key} method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_keyvalue>>/collections/<<collection:docs_collection>>/{rw_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
main-write: main-write:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_keyvalue>>/collections/<<table:docs_collection>>/{rw_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_keyvalue>>/collections/<<collection:docs_collection>>/{rw_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -2,9 +2,9 @@ min_version: "4.17.15"
description: | description: |
This workload emulates advanced search filter combinations for the Stargate Documents API. This workload emulates advanced search filter combinations for the Stargate Documents API.
During the rampup phase, it generates documents, writes them to a table, and then warms up the search paths. During the rampup phase, it generates documents, writes them to a collection, and then warms up the search paths.
During the main phase it performs various basic search filters and times their execution. During the main phase it performs various basic search filters and times their execution.
Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180).
# These are the filter combinations tested in this workload, and their names: # These are the filter combinations tested in this workload, and their names:
# in: match1 IN [0] # in: match1 IN [0]
@ -32,10 +32,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: docsapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: docsapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: docsapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<docsapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -61,40 +61,45 @@ bindings:
blocks: blocks:
schema: schema:
statements: statements:
create-keyspace: create-namespace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/schemas/namespaces
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<keyspace:docs_search_advanced>>", "name": "<<namespace:docs_search_advanced>>",
"replicas": <<rf:1>> "replicas": <<rf:1>>
} }
ok-status: ".*"
delete-docs-collection: delete-docs-collection:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>> method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
create-docs-collection: create-docs-collection:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<table:docs_collection>>" "name": "<<collection:docs_collection>>"
} }
rampup: rampup:
ops: ops:
rampup-put: rampup-put:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>/{seq_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>/{seq_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -129,7 +134,9 @@ blocks:
# where={"match1":{"$in":[0]}} # where={"match1":{"$in":[0]}}
rampup-get-in: rampup-get-in:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> driver: http
method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -137,7 +144,8 @@ blocks:
# where={"match2":{"$nin":["false"]}} # where={"match2":{"$nin":["false"]}}
rampup-get-not-in: rampup-get-not-in:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -145,7 +153,8 @@ blocks:
# where={"match2":{"$eq":"true"},"match3":{"$ne": false}} # where={"match2":{"$eq":"true"},"match3":{"$ne": false}}
rampup-get-mem-and: rampup-get-mem-and:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -153,7 +162,8 @@ blocks:
rampup-get-mem-or: rampup-get-mem-or:
# where={"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]} # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -161,7 +171,8 @@ blocks:
# where={"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]} # where={"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}
rampup-get-complex1: rampup-get-complex1:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -169,7 +180,8 @@ blocks:
rampup-get-complex2: rampup-get-complex2:
# where={"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} # where={"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -177,7 +189,8 @@ blocks:
# where={"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} # where={"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}
rampup-get-complex3: rampup-get-complex3:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -187,7 +200,8 @@ blocks:
ops: ops:
# where={"match1":{"$in":[0]}} # where={"match1":{"$in":[0]}}
main-get-in: main-get-in:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -195,7 +209,8 @@ blocks:
# where={"match2":{"$nin":["false"]}} # where={"match2":{"$nin":["false"]}}
main-get-not-in: main-get-not-in:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -203,7 +218,8 @@ blocks:
# where={"match2":{"$eq":"true"},"match3":{"$ne": false}} # where={"match2":{"$eq":"true"},"match3":{"$ne": false}}
main-get-mem-and: main-get-mem-and:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -211,7 +227,8 @@ blocks:
# where={"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]} # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}
main-get-mem-or: main-get-mem-or:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -219,7 +236,8 @@ blocks:
# where={"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]} # where={"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}
main-get-complex1: main-get-complex1:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -227,7 +245,8 @@ blocks:
# where={"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} # where={"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}
main-get-complex2: main-get-complex2:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -235,7 +254,8 @@ blocks:
# where={"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} # where={"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}
main-get-complex3: main-get-complex3:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_advanced>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_advanced>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -2,9 +2,9 @@ min_version: "4.17.15"
description: | description: |
This workload emulates basic search operations for the Stargate Documents API. This workload emulates basic search operations for the Stargate Documents API.
During the rampup phase, it generates documents, writes them to a table, and then warms up the search paths. During the rampup phase, it generates documents, writes them to a collection, and then warms up the search paths.
During the main phase it performs various basic search filters and times their execution. During the main phase it performs various basic search filters and times their execution.
Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180).
scenarios: scenarios:
schema: run driver=http tags==block:schema threads==<<threads:1>> cycles==UNDEF schema: run driver=http tags==block:schema threads==<<threads:1>> cycles==UNDEF
@ -22,10 +22,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: docsapi_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: docsapi_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: docsapi_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<docsapi_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -49,40 +49,45 @@ bindings:
blocks: blocks:
schema: schema:
ops: ops:
create-keyspace: create-namespace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/schemas/keyspaces method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/schemas/namespaces
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<keyspace:docs_search_basic>>", "name": "<<namespace:docs_search_basic>>",
"replicas": <<rf:1>> "replicas": <<rf:1>>
} }
ok-status: ".*"
delete-docs-collection: delete-docs-collection:
op: DELETE <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>> method: DELETE
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
ok-status: "[2-4][0-9][0-9]" ok-status: "[2-4][0-9][0-9]"
create-docs-collection: create-docs-collection:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"name": "<<table:docs_collection>>" "name": "<<collection:docs_collection>>"
} }
rampup: rampup:
ops: ops:
rampup-put: rampup-put:
op: PUT <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>/{seq_key} method: PUT
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>/{seq_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -117,7 +122,8 @@ blocks:
# where={"match3":{"$eq":true}} # where={"match3":{"$eq":true}}
rampup-get-eq: rampup-get-eq:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -125,7 +131,8 @@ blocks:
# where={"match1":{"$lt":1}} # where={"match1":{"$lt":1}}
rampup-get-lt: rampup-get-lt:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -133,7 +140,8 @@ blocks:
# where={"match1":{"$lt":1},"match2":{"$eq":"true"}} # where={"match1":{"$lt":1},"match2":{"$eq":"true"}}
rampup-get-and: rampup-get-and:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -141,7 +149,8 @@ blocks:
# where={"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]} # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}
rampup-get-or: rampup-get-or:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -149,7 +158,8 @@ blocks:
# where={"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]} # where={"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}
main-get-or-single-match: main-get-or-single-match:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -159,7 +169,8 @@ blocks:
main: main:
ops: ops:
main-get-eq: main-get-eq:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -167,7 +178,8 @@ blocks:
# where={"match1":{"$lt":1}} # where={"match1":{"$lt":1}}
main-get-lt: main-get-lt:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -175,7 +187,8 @@ blocks:
# where={"match1":{"$lt":1},"match2":{"$eq":"true"}} # where={"match1":{"$lt":1},"match2":{"$eq":"true"}}
main-get-and: main-get-and:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -183,7 +196,8 @@ blocks:
# where={"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]} # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}
main-get-or: main-get-or:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -191,7 +205,8 @@ blocks:
# where={"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]} # where={"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}
main-get-or-single-match: main-get-or-single-match:
op: GET <<protocol:http>>://{weighted_hosts}:<<stargate_port:8082>><<path_prefix:>>/v2/namespaces/<<keyspace:docs_search_basic>>/collections/<<table:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>> method: GET
uri: <<protocol:http>>://{weighted_hosts}:<<docsapi_port:8180>><<path_prefix:>>/v2/namespaces/<<namespace:docs_search_basic>>/collections/<<collection:docs_collection>>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<<page-size,3>>&fields=<<fields,%5b%5d>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -5,7 +5,7 @@ description: |
This should be identical to the cql variant except for: This should be identical to the cql variant except for:
- There is no instrumentation with the http driver. - There is no instrumentation with the http driver.
- There is no async mode with the http driver. - There is no async mode with the http driver.
Note that stargate_port should reflect the port where GraphQL API is exposed (defaults to 8080). Note that graphql_port should reflect the port where GraphQL API is exposed (defaults to 8080).
scenarios: scenarios:
default: default:
@ -16,10 +16,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: graphql_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: graphql_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: graphql_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<graphql_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -32,59 +32,58 @@ blocks:
schema: schema:
ops: ops:
create-keyspace: create-keyspace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"mutation {\n createKeyspace(name:\"<<keyspace:gqlcf_keyvalue>>\", replicas: <<rf:1>>, ifNotExists: true)\n}"} {"query":"mutation {\n createKeyspace(name:\"<<keyspace:gqlcf_keyvalue>>\", replicas: <<rf:1>>, ifNotExists: true)\n}"}
create-table: create-table:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema method: POST
Accept: "application/json" uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json"
body: |
{"query":"mutation {\n createTable(\n keyspaceName: \"<<keyspace:gqlcf_keyvalue>>\"\n tableName: \"<<table:keyvalue>>\"\n partitionKeys: [{ name: \"key\", type: { basic: TEXT } }]\n values: [{ name: \"value\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}"}
schema-astra:
ops:
create-table-astra:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"mutation {\n createTable(\n keyspaceName: \"<<keyspace:gqlcf_keyvalue>>\"\n tableName: \"<<table:keyvalue>>\"\n partitionKeys: [{ name: \"key\", type: { basic: TEXT } }]\n values: [{ name: \"value\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}"} {"query":"mutation {\n createTable(\n keyspaceName: \"<<keyspace:gqlcf_keyvalue>>\"\n tableName: \"<<table:keyvalue>>\"\n partitionKeys: [{ name: \"key\", type: { basic: TEXT } }]\n values: [{ name: \"value\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}"}
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"mutation {\n insert<<table:keyvalue>>( value: {key: \"{seq_key}\", value: \"{seq_value}\",}) {value {key, value}}}"} {"query":"mutation {\n insert<<table:keyvalue>>( value: {key: \"{seq_key}\", value: \"{seq_value}\",}) {value {key, value}}}"}
main-read: main-read:
params: params:
ratio: <<read_ratio:5>> ratio: <<read_ratio:5>>
ops: ops:
main-select: main-select:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"{<<table:keyvalue>>(value: {key: \"{rw_key}\"}) {values {key, value}}}"} {"query":"{<<table:keyvalue>>(value: {key: \"{rw_key}\"}) {values {key, value}}}"}
main-write: main-write:
params: params:
ratio: <<write_ratio:5>> ratio: <<write_ratio:5>>
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -6,7 +6,7 @@ description: |
- We need to URLEncode the `data` and `data_write` bindings because newlines can't be sent in REST calls. - We need to URLEncode the `data` and `data_write` bindings because newlines can't be sent in REST calls.
- There is no instrumentation with the http driver. - There is no instrumentation with the http driver.
- There is no async mode with the http driver. - There is no async mode with the http driver.
Note that stargate_port should reflect the port where GraphQL API is exposed (defaults to 8080). Note that graphql_port should reflect the port where GraphQL API is exposed (defaults to 8080).
scenarios: scenarios:
default: default:
@ -17,10 +17,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: graphql_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: graphql_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: graphql_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<graphql_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
# for ramp-up and verify # for ramp-up and verify
@ -42,59 +42,58 @@ blocks:
phase: schema phase: schema
ops: ops:
create-keyspace: create-keyspace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"mutation {\n createKeyspace(name:\"<<keyspace:gqlcf_tabular>>\", replicas: <<rf:1>>, ifNotExists: true)\n}"} {"query":"mutation {\n createKeyspace(name:\"<<keyspace:gqlcf_tabular>>\", replicas: <<rf:1>>, ifNotExists: true)\n}"}
create-table: create-table:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema method: POST
Accept: "application/json" uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json"
body: |
{"query":"mutation {\n createTable(\n keyspaceName: \"<<keyspace:gqlcf_tabular>>\"\n tableName: \"<<table:tabular>>\"\n partitionKeys: [{ name: \"part\", type: { basic: TEXT } }]\n clusteringKeys: [{ name: \"clust\", type: { basic: TEXT } }]\n values: [{ name: \"data\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}\n"}
schema-astra:
ops:
create-table-astra:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"mutation {\n createTable(\n keyspaceName: \"<<keyspace:gqlcf_tabular>>\"\n tableName: \"<<table:tabular>>\"\n partitionKeys: [{ name: \"part\", type: { basic: TEXT } }]\n clusteringKeys: [{ name: \"clust\", type: { basic: TEXT } }]\n values: [{ name: \"data\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}\n"} {"query":"mutation {\n createTable(\n keyspaceName: \"<<keyspace:gqlcf_tabular>>\"\n tableName: \"<<table:tabular>>\"\n partitionKeys: [{ name: \"part\", type: { basic: TEXT } }]\n clusteringKeys: [{ name: \"clust\", type: { basic: TEXT } }]\n values: [{ name: \"data\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}\n"}
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"mutation {\n insert<<table:tabular>>( value: {part: \"{part_layout}\", clust: \"{clust_layout}\", data: \"{data}\"}) {value {part, clust, data}}}"} {"query":"mutation {\n insert<<table:tabular>>( value: {part: \"{part_layout}\", clust: \"{clust_layout}\", data: \"{data}\"}) {value {part, clust, data}}}"}
main-read: main-read:
params: params:
ratio: 5 ratio: 5
ops: ops:
main-select: main-select:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"{<<table:tabular>>(value: {part: \"{part_read}\"}, options: { pageSize: <<limit:10>> }) {values {part, clust, data}}}"} {"query":"{<<table:tabular>>(value: {part: \"{part_read}\"}, options: { pageSize: <<limit:10>> }) {values {part, clust, data}}}"}
main-write: main-write:
params: params:
ratio: 5 ratio: 5
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -9,7 +9,7 @@ description: |
- Schema creation is cql of the lack of being able to define compaction strategy in the graphql API. - Schema creation is cql of the lack of being able to define compaction strategy in the graphql API.
- There is no instrumentation with the http driver. - There is no instrumentation with the http driver.
- There is no async mode with the http driver. - There is no async mode with the http driver.
Note that stargate_port should reflect the port where GraphQL API is exposed (defaults to 8080). Note that graphql_port should reflect the port where GraphQL API is exposed (defaults to 8080).
scenarios: scenarios:
default: default:
@ -20,10 +20,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: graphql_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: graphql_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: graphql_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<graphql_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
@ -39,70 +39,59 @@ blocks:
params: params:
prepared: false prepared: false
ops: ops:
create-keyspace: | create-keyspace:
create keyspace if not exists <<keyspace:gqlcf_iot>> method: POST
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'} uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
AND durable_writes = true; Accept: "application/json"
create-table : | X-Cassandra-Request-Id: "{request_id}"
create table if not exists <<keyspace:gqlcf_iot>>.<<table:iot>> ( X-Cassandra-Token: "<<auth_token:my_auth_token>>"
machine_id UUID, // source machine Content-Type: "application/json"
sensor_name text, // sensor name body: |
time timestamp, // timestamp of collection {"query":"mutation {\n createKeyspace(name:\"<<keyspace:gqlcf_iot>>\", replicas: <<rf:1>>, ifNotExists: true)\n}"}
sensor_value double, //
station_id UUID, // source location create-table:
data text, method: POST
PRIMARY KEY ((machine_id, sensor_name), time) uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
) WITH CLUSTERING ORDER BY (time DESC) Accept: "application/json"
AND compression = { 'sstable_compression' : '<<compression:LZ4Compressor>>' } X-Cassandra-Request-Id: "{request_id}"
AND compaction = { X-Cassandra-Token: "<<auth_token:my_auth_token>>"
'class': 'TimeWindowCompactionStrategy', Content-Type: "application/json"
'compaction_window_size': <<expiry_minutes:60>>, body: |
'compaction_window_unit': 'MINUTES' {"query":"mutation {\n createTable(\n keyspaceName: \"<<keyspace:gqlcf_iot>>\"\n tableName: \"<<table:iot>>\"\n partitionKeys: [{ name: \"machine_id\", type: { basic: UUID } }, { name: \"sensor_name\", type: { basic: TEXT } }]\n clusteringKeys: [{ name: \"time\", type: { basic: TIMESTAMP }, order: \"DESC\" }]\n values: [{ name: \"sensor_value\", type: { basic: FLOAT } }, { name: \"station_id\", type: { basic: UUID } }, { name: \"data\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}\n"}
};
truncate-table: |
truncate table <<keyspace:gqlcf_iot>>.<<table:iot>>;
schema-astra:
params:
prepared: false
ops:
create-table-astra : |
create table if not exists <<keyspace:gqlcf_iot>>.<<table:iot>> (
machine_id UUID, // source machine
sensor_name text, // sensor name
time timestamp, // timestamp of collection
sensor_value double, //
station_id UUID, // source location
data text,
PRIMARY KEY ((machine_id, sensor_name), time)
) WITH CLUSTERING ORDER BY (time DESC);
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_iot>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_iot>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"mutation insertReading {\n reading: insert<<table:iot>>( value: {machine_id: \"{machine_id}\", sensor_name: \"{sensor_name}\", time: \"{time}\", data: \"{data}\", sensor_value: {sensor_value}, station_id: \"{station_id}\"}) {value {machine_id, sensor_name, time, data, sensor_value, station_id}}}"} {"query":"mutation insertReading {\n reading: insert<<table:iot>>( value: {machine_id: \"{machine_id}\", sensor_name: \"{sensor_name}\", time: \"{time}\", data: \"{data}\", sensor_value: {sensor_value}, station_id: \"{station_id}\"}) {value {machine_id, sensor_name, time, data, sensor_value, station_id}}}"}
main-read: main-read:
params: params:
ratio: <<read_ratio:1>> ratio: <<read_ratio:1>>
ops: ops:
main-select: main-select:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_iot>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_iot>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{"query":"query readings {<<table:iot>>(value: {machine_id: \"{machine_id}\",sensor_name: \"{sensor_name}\"}, options: { pageSize: <<limit:10>> }) {values {machine_id, sensor_name, time, data, sensor_value, station_id}}}"} {"query":"query readings {<<table:iot>>(value: {machine_id: \"{machine_id}\",sensor_name: \"{sensor_name}\"}, options: { pageSize: <<limit:10>> }) {values {machine_id, sensor_name, time, data, sensor_value, station_id}}}"}
main-write: main-write:
params: params:
ratio: <<write_ratio:9>> ratio: <<write_ratio:9>>
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_iot>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlcf_iot>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -9,7 +9,7 @@ description: |
- Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options. - Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options.
- There is no instrumentation with the http driver. - There is no instrumentation with the http driver.
- There is no async mode with the http driver. - There is no async mode with the http driver.
Note that stargate_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). Note that graphql_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080).
scenarios: scenarios:
default: default:
@ -20,10 +20,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: graphql_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: graphql_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: graphql_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<graphql_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
seq_key: Mod(<<keycount:10000000>>); ToString() -> String seq_key: Mod(<<keycount:10000000>>); ToString() -> String
@ -35,7 +35,8 @@ blocks:
schema: schema:
ops: ops:
create-keyspace: create-keyspace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -44,20 +45,10 @@ blocks:
{ {
"query":"mutation {\n createKeyspace(name: \"<<keyspace:gqlsf_keyvalue>>\", replicas: <<rf:1>>, ifNotExists: true) \n}\n" "query":"mutation {\n createKeyspace(name: \"<<keyspace:gqlsf_keyvalue>>\", replicas: <<rf:1>>, ifNotExists: true) \n}\n"
} }
create-gql-schema: create-gql-schema:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-admin method: POST
Accept: "application/json" uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-admin
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json"
body: |
{
"query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_keyvalue>>\", schema: \"\"\"\n type KeyValue @cql_input {\n key: String! @cql_column(partitionKey: true)\n value: String!\n }\n type Query {\n getKeyValue(\n key: String!,\n ): KeyValue\n }\n type Mutation {\n \t\tinsertKeyValue(keyValue: KeyValueInput): KeyValue\n }\n \"\"\") {\n version\n }\n}\n"
}
schema-astra:
ops:
create-gql-schema:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-admin
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -66,10 +57,12 @@ blocks:
{ {
"query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_keyvalue>>\", schema: \"\"\"\n type KeyValue @cql_input {\n key: String! @cql_column(partitionKey: true)\n value: String!\n }\n type Query {\n getKeyValue(\n key: String!,\n ): KeyValue\n }\n type Mutation {\n \t\tinsertKeyValue(keyValue: KeyValueInput): KeyValue\n }\n \"\"\") {\n version\n }\n}\n" "query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_keyvalue>>\", schema: \"\"\"\n type KeyValue @cql_input {\n key: String! @cql_column(partitionKey: true)\n value: String!\n }\n type Query {\n getKeyValue(\n key: String!,\n ): KeyValue\n }\n type Mutation {\n \t\tinsertKeyValue(keyValue: KeyValueInput): KeyValue\n }\n \"\"\") {\n version\n }\n}\n"
} }
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -78,12 +71,14 @@ blocks:
{ {
"query":"mutation {\n insertKeyValue(keyValue: {key: \"{seq_key}\", value: \"{seq_value}\"}) {\n key\n value\n }\n}\n" "query":"mutation {\n insertKeyValue(keyValue: {key: \"{seq_key}\", value: \"{seq_value}\"}) {\n key\n value\n }\n}\n"
} }
main-read: main-read:
params: params:
ratio: <<read_ratio:1>> ratio: <<read_ratio:1>>
ops: ops:
main-select: main-select:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -92,12 +87,14 @@ blocks:
{ {
"query":"{\n getKeyValue(key: \"rw_key\") {\n key\n value\n }\n}\n" "query":"{\n getKeyValue(key: \"rw_key\") {\n key\n value\n }\n}\n"
} }
main-write: main-write:
params: params:
ratio: <<write_ratio:9>> ratio: <<write_ratio:9>>
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_keyvalue>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_keyvalue>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -11,7 +11,7 @@ description: |
- Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options. - Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options.
- There is no instrumentation with the http driver. - There is no instrumentation with the http driver.
- There is no async mode with the http driver. - There is no async mode with the http driver.
Note that stargate_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). Note that graphql_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080).
scenarios: scenarios:
default: default:
@ -22,10 +22,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: graphql_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: graphql_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: graphql_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<graphql_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
# for ramp-up and verify # for ramp-up and verify
@ -45,7 +45,8 @@ blocks:
schema: schema:
ops: ops:
create-keyspace: create-keyspace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -54,20 +55,10 @@ blocks:
{ {
"query":"mutation {\n createKeyspace(name: \"<<keyspace:gqlsf_tabular>>\", replicas: <<rf:1>>, ifNotExists: true) \n}\n" "query":"mutation {\n createKeyspace(name: \"<<keyspace:gqlsf_tabular>>\", replicas: <<rf:1>>, ifNotExists: true) \n}\n"
} }
create-gql-schema: create-gql-schema:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-admin method: POST
Accept: "application/json" uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-admin
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json"
body: |
{
"query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_tabular>>\", schema: \"\"\"\n type Tabular @cql_input {\n part: String! @cql_column(partitionKey: true)\n clust: String! @cql_column(partitionKey: true)\n data: String! \n }\n type SelectTabularResult @cql_payload {\n \t\tdata: [Tabular]\n \t\tpagingState: String\n }\n type Query {\n getTabulars(\n part: String!,\n clust: String!,\n pagingState: String @cql_pagingState\n ): SelectTabularResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertTabular(tabular: TabularInput): Tabular\n }\n \"\"\") {\n version\n }\n}\n"
}
schema-astra:
ops:
create-gql-schema:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-admin
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -76,10 +67,12 @@ blocks:
{ {
"query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_tabular>>\", schema: \"\"\"\n type Tabular @cql_input {\n part: String! @cql_column(partitionKey: true)\n clust: String! @cql_column(partitionKey: true)\n data: String! \n }\n type SelectTabularResult @cql_payload {\n \t\tdata: [Tabular]\n \t\tpagingState: String\n }\n type Query {\n getTabulars(\n part: String!,\n clust: String!,\n pagingState: String @cql_pagingState\n ): SelectTabularResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertTabular(tabular: TabularInput): Tabular\n }\n \"\"\") {\n version\n }\n}\n" "query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_tabular>>\", schema: \"\"\"\n type Tabular @cql_input {\n part: String! @cql_column(partitionKey: true)\n clust: String! @cql_column(partitionKey: true)\n data: String! \n }\n type SelectTabularResult @cql_payload {\n \t\tdata: [Tabular]\n \t\tpagingState: String\n }\n type Query {\n getTabulars(\n part: String!,\n clust: String!,\n pagingState: String @cql_pagingState\n ): SelectTabularResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertTabular(tabular: TabularInput): Tabular\n }\n \"\"\") {\n version\n }\n}\n"
} }
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -88,12 +81,14 @@ blocks:
{ {
"query":"mutation {\n insertTabular(tabular: {part: \"{part_layout}\", clust: \"{clust_layout}\", data: \"{data}\"}) {\n part\n clust\n data\n }\n}\n" "query":"mutation {\n insertTabular(tabular: {part: \"{part_layout}\", clust: \"{clust_layout}\", data: \"{data}\"}) {\n part\n clust\n data\n }\n}\n"
} }
main-read: main-read:
params: params:
ratio: <<read_ratio:1>> ratio: <<read_ratio:1>>
ops: ops:
main-select: main-select:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -102,12 +97,14 @@ blocks:
{ {
"query":"{\n getTabulars(part: \"{part_read}\", clust: \"{clust_read}\") {\n data {\n part\n clust\n data\n }\n pagingState\n }\n}\n" "query":"{\n getTabulars(part: \"{part_read}\", clust: \"{clust_read}\") {\n data {\n part\n clust\n data\n }\n pagingState\n }\n}\n"
} }
main-write: main-write:
params: params:
ratio: <<write_ratio:9>> ratio: <<write_ratio:9>>
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_tabular>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_tabular>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"

View File

@ -15,7 +15,7 @@ description: |
- Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options. - Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options.
- There is no instrumentation with the http driver. - There is no instrumentation with the http driver.
- There is no async mode with the http driver. - There is no async mode with the http driver.
Note that stargate_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). Note that graphql_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080).
scenarios: scenarios:
default: default:
@ -26,10 +26,10 @@ scenarios:
bindings: bindings:
# To enable an optional weighted set of hosts in place of a load balancer # To enable an optional weighted set of hosts in place of a load balancer
# Examples # Examples
# single host: stargate_host=host1 # single host: graphql_host=host1
# multiple hosts: stargate_host=host1,host2,host3 # multiple hosts: graphql_host=host1,host2,host3
# multiple weighted hosts: stargate_host=host1:3,host2:7 # multiple weighted hosts: graphql_host=host1:3,host2:7
weighted_hosts: WeightedStrings('<<stargate_host:stargate>>') weighted_hosts: WeightedStrings('<<graphql_host:stargate>>')
# http request id # http request id
request_id: ToHashedUUID(); ToString(); request_id: ToHashedUUID(); ToString();
machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID machine_id: Mod(<<sources:10000>>); ToHashedUUID() -> java.util.UUID
@ -43,7 +43,8 @@ blocks:
schema: schema:
ops: ops:
create-keyspace: create-keyspace:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-schema method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-schema
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -52,8 +53,10 @@ blocks:
{ {
"query":"mutation {\n createKeyspace(name: \"<<keyspace:gqlsf_timeseries>>\", replicas: <<rf:1>>, ifNotExists: true) \n}\n" "query":"mutation {\n createKeyspace(name: \"<<keyspace:gqlsf_timeseries>>\", replicas: <<rf:1>>, ifNotExists: true) \n}\n"
} }
create-gql-schema: create-gql-schema:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-admin method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql-admin
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -62,24 +65,12 @@ blocks:
{ {
"query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_timeseries>>\", schema: \"\"\"\n type Iot @cql_input {\n machine_id: Uuid! @cql_column(partitionKey: true)\n sensor_name: String! @cql_column(partitionKey: true)\n time: Timestamp! @cql_column(clusteringOrder: DESC)\n sensor_value: Float!\n \tstation_id: Uuid!\n data: String!\n }\n type SelectIotResult @cql_payload {\n \t\tdata: [Iot]\n \t\tpagingState: String\n }\n type Query {\n getIots(\n machine_id: Uuid!,\n sensor_name: String!,\n pagingState: String @cql_pagingState\n ): SelectIotResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertIot(iot: IotInput): Iot\n }\n \"\"\") {\n version\n }\n}\n" "query":"mutation {\n deploySchema(keyspace: \"<<keyspace:gqlsf_timeseries>>\", schema: \"\"\"\n type Iot @cql_input {\n machine_id: Uuid! @cql_column(partitionKey: true)\n sensor_name: String! @cql_column(partitionKey: true)\n time: Timestamp! @cql_column(clusteringOrder: DESC)\n sensor_value: Float!\n \tstation_id: Uuid!\n data: String!\n }\n type SelectIotResult @cql_payload {\n \t\tdata: [Iot]\n \t\tpagingState: String\n }\n type Query {\n getIots(\n machine_id: Uuid!,\n sensor_name: String!,\n pagingState: String @cql_pagingState\n ): SelectIotResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertIot(iot: IotInput): Iot\n }\n \"\"\") {\n version\n }\n}\n"
} }
schema-astra:
ops:
create-gql-schema:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql-admin
Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>"
Content-Type: "application/json"
body: |
{
"query":"mutation {\n deploySchema(namespace: \"<<keyspace:gqlsf_timeseries>>\", schema: \"\"\"\n type Iot @cql_input {\n machine_id: Uuid! @cql_column(partitionKey: true)\n sensor_name: String! @cql_column(partitionKey: true)\n time: Timestamp! @cql_column(clusteringOrder: DESC)\n sensor_value: Float!\n \tstation_id: Uuid!\n data: String!\n }\n type SelectIotResult @cql_payload {\n \t\tdata: [Iot]\n \t\tpagingState: String\n }\n type Query {\n getIots(\n machine_id: Uuid!,\n sensor_name: String!,\n pagingState: String @cql_pagingState\n ): SelectIotResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertIot(iot: IotInput): Iot\n }\n \"\"\") {\n version\n }\n}\n"
}
tags:
name: create-gql-schema
rampup: rampup:
ops: ops:
rampup-insert: rampup-insert:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_timeseries>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_timeseries>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -94,7 +85,8 @@ blocks:
ratio: <<read_ratio:1>> ratio: <<read_ratio:1>>
ops: ops:
main-select: main-select:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_timeseries>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_timeseries>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -109,7 +101,8 @@ blocks:
ratio: <<write_ratio:9>> ratio: <<write_ratio:9>>
ops: ops:
main-write: main-write:
op: POST <<protocol:http>>://{weighted_hosts}:<<stargate_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_timeseries>> method: POST
uri: <<protocol:http>>://{weighted_hosts}:<<graphql_port:8080>><<path_prefix:>>/graphql/<<keyspace:gqlsf_timeseries>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"