Skip to main content

Generator configuration

throttle

Commentary

added in 0.0.5

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": {
"throttle": {
"ms": {
"_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
}
},
"localConfigs": {
"throttle": {
"ms": {
"_gen": "uniformDistribution",
"bounds": [
5,
200
]
}
}
}
}
]
}

Specification

JSON schema

{
"type": "object",
"properties": {
"ms": {
"oneOf": [
{
"type": "number",
"minimum": 0
},
{
"type": "object"
}
]
}
}
}