smartcat-labs / berserker

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

Load profile #15

Open nivancevic opened 7 years ago

nivancevic commented 7 years ago

This topic, and following discussion, is expected to help shaping of a more generic and robust architecture of Berserker. The main purpose of the load generator is to generate load. The total, or output load of the load generator can be described and configured as a cumulative load of simple, elementary load generators.

Ltot = Lp1 + Lp2 + Lp3

Every elementary load generator can be described by a load profile. Load profile is a pair of load rate (produced by a rate generator) and data source (e.g. Ranger data generator).

This approach should provide a way to simulate total load in a multi-tenant system where behavior of particular tenants can significantly vary. A single (or several) load profiles can be used to describe a single tenant load.

load-profiles:
    - rate:
          generator: 2000 + 1000.05*sin(2h50m)
      data:
          type: ranger
          options:
              values:
                   id: uuid()
                   msg:
                       id: @id
                       payload: rlen(100...1000)
               output: msg

    -  rate:
          offset: 24h
          generator:
              a: 2000 + 1000*bell(3d, 12h)
              b: 5000*bell(7d, 2d) + 50*random(60s)
              output: @a + @b
        data:
           type: ranger
           options:
                 values:
                     msg:
                         id: uuid()
                         payload: rlen(100...1000)
                 output: msg