Skip to main content

Generator configuration

throttleMs

Commentary​

added in 0.5.3

local configuration

global configuration

The minimum number of ms between how quickly a generator creates another event. Setting it under localConfigs controls the frequency for a single generator. Setting it under globalConfigs sets it for all generators. Preference is given to localConfigs when both are set.


Examples​

Local configuration​

Use localConfigs to set throttle locally for one generator.

{
"generators": [
{
"table": "orders",
"row": {
"orderId": {
"_gen": "uuid"
},
"orderDate": {
"_gen": "dateToday"
},
"cost": {
"_gen": "normalDistribution",
"mean": 50,
"sd": 20
}
},
"localConfigs": {
"throttleMs": {
"_gen": "uniformDistribution",
"bounds": [
5,
200
]
}
}
}
]
}

Global configuration​

Use globalConfigs to set throttle globally for all generators.

{
"generators": [
{
"table": "orders",
"row": {
"orderId": {
"_gen": "uuid"
},
"orderDate": {
"_gen": "dateToday"
},
"cost": {
"_gen": "normalDistribution",
"mean": 50,
"sd": 20
}
}
}
],
"globalConfigs": {
"throttleMs": {
"_gen": "uniformDistribution",
"bounds": [
5,
200
]
}
}
}

Specification​

JSON schema​

{
"oneOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
}