Closed muzarski closed 1 month ago
I think I could add some tests with exemplary yaml files. I'm not sure if it's a good idea since this would pollute our repo a bit (?). WDYT?
Definitely, do that! Those will serve both as test cases and for quick reference on what kind of user config is supported.
v2:
Is the list of features documented somewhere? If we support something (in this case: user profiles) only conditionally, it should definitely be said that you can turn it using name-of-the-feature.
v2.1: moved queries.is_empty()
check, so it is detected during yaml file parsing.
I think I could add some tests with exemplary yaml files. I'm not sure if it's a good idea since this would pollute our repo a bit (?). WDYT?
Definitely, do that! Those will serve both as test cases and for quick reference on what kind of user config is supported.
v3: added test cases for contents of yaml files
v3.1: adjusted the logic so unknown yaml parameters are denied and treated as error.
Is the list of features documented somewhere? If we support something (in this case: user profiles) only conditionally, it should definitely be said that you can turn it using name-of-the-feature.
The problem is that README
for c-s frontend is just empty. I'll open a PR that updates the README (and includes info about user profiles and set of supported features) which will base on this PR. WDYT?
ref: https://cassandra.apache.org/doc/stable/cassandra/tools/cassandra_stress.html#user-mode
Motivation
User command is the most complex c-s command. It is very flexible and allows user to define his own schema, as well as stress queries. We obviously want to support this command in cql-stress.
User profiles
ref: https://cassandra.apache.org/doc/stable/cassandra/tools/cassandra_stress.html#profile
User can define the benchmark via profile yaml file. In this PR we introduce support for most commonly used profile parameters, which are:
keyspace
keyspace_definition
table
table_definition
queries
Changes
UserParams
struct which contains the payload needed to run the benchmarkuser
command, which includes theprofile=
parameter that specifies the path to yaml file. Notice that c-s supportsops
andclustering=
parameters as well. These two define the ratio which we sample the specificqueries
from. As for now, I want to keep it simple and in the following PRs I plan to sample the operations in the round-robin fashion. We will introduce non-determinism in the future.Tests
I think I could add some tests with exemplary yaml files. I'm not sure if it's a good idea since this would pollute our repo a bit (?). WDYT?