Generator configuration
throughput
Commentary
added in 0.8.8
local configuration
global configuration
The approximate number of events per second that will be created by this generator. Note this value is a ceiling: if your generator can't create events faster than the desired throughput, it will simply run as fast as possible while remaining below the limit.
Also note that this parameter is independent of connection-specific batching parameters, like linger
in Kafka and batchRows
in Postgres. Setting throughput
will control event creation; setting connection-specific batching parameters will control event emission.
Examples
Local configuration
Use localConfigs
to set throughput
locally for one generator. In this example, approximately 20 events are generated per second.
{
"generators": [
{
"topic": "sandbox",
"value": {
"_gen": "oneOf",
"choices": [
1,
2,
3
]
},
"localConfigs": {
"throughput": 20
}
}
]
}
Global configuration
Use globalConfigs
to set throughput
globally for all generators. In this example, approximately 50 events are generated per second.
{
"generators": [
{
"topic": "sandbox",
"value": {
"_gen": "oneOf",
"choices": [
4,
5,
6
]
}
}
],
"globalConfigs": {
"throughput": 50
}
}
Specification
JSON schema
{
"oneOf": [
{
"type": "integer",
"minimum": 1
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
}