smartcat-labs / berserker

Berserker is load generator with pluggable input source and configurable output.
Apache License 2.0
52 stars 8 forks source link

Improve documentation for configuration #31

Open milannister opened 7 years ago

milannister commented 7 years ago

Berserker's configuration options are not documented properly. Each and every configuration option should have proper explanation.

For example, following configuration option is not clear:

rate-generator-configuration:
  rate: 1000

rate is quite ambiguous and can have different meanings.

vajda commented 7 years ago

Also:

  1. mention example configurations in README file.
  2. Add prepared statement example in ranger-cassandra.yml configuration
  3. Fix measurement.name property in ranger-kafka.yml configuration
vajda commented 7 years ago

In main README.md file, where each module is described, it should follow with link to module specific readme with configuration example and explanation.

vajda commented 7 years ago

Each configuration file within examples directory in berserker-runner should have inline comments explaining every line.

ericorange commented 6 years ago

I am trying to generate multiple message formats at different rates, is this possible with a single configuration or do I need to run as multiple processes? Below is a toy example with two different message formats (logins and user_actions), which I would like to generate at different rates (20 and 1000).

data-source-configuration:
  values:
    logins:
      id: uuid()
      firstName: random(['Peter', 'Mike', 'Steven', 'Joshua', 'John', 'Brandon'])
      lastName: random(['Smith', 'Johnson', 'Williams', 'Davis', 'Jackson', 'White', 'Lewis', 'Clark'])
      age: random(20..45)
    user_actions:
      user_id: uuid()
      action: random(['create_page', 'change_password', 'delete_page'])

rate-generator-configuration:
  rates:
    login_rate: 20
    action_rate: 1000
  output: ???
vajda commented 6 years ago

Yes and no. :) Berserker does not support associating an rate to particular data source output, and other rate to different data source output. In fact, only one data source output can be created and only one rate. Having said that, there are two possibilities how can you approach this.

  1. You can run multiple berserker-runner processes, each with it's own configuration as you already noticed, this is prefered option as you can guarantee rate for each precisely.
  2. You can make rate of 1020 and have login and user_action distribution in ratio 20:1000. That way you can achieve it in single runner, but than you don't have guarantee that logins sometimes won't have higher rate than 20/s (depending on the distribution in can happen that one second rate is 30/s, some 15/s, but on average it would be 20/s) Configuration for such case would be something like this:
    
    data-source-configuration:
    values:
    logins:
      id: uuid()
      firstName: random(['Peter', 'Mike', 'Steven', 'Joshua', 'John', 'Brandon'])
      lastName: random(['Smith', 'Johnson', 'Williams', 'Davis', 'Jackson', 'White', 'Lewis', 'Clark'])
      age: random(20..45)
    user_actions:
      user_id: uuid()
      action: random(['create_page', 'change_password', 'delete_page'])
    output: weighted([($logins, 20), ($user_actions, 1000)])

rate-generator-configuration: rates: r: 1020 output: $r