Skip to main content

Generator configuration

delay

Commentary

added in 0.0.38

local configuration

global configuration

Generates out of order events. Specify the rate at which to delay the release of an event for some number of milliseconds. When an event is delayed, the generator is immediately elligible to create another event, regardless of any throttle settings. Throttling will trigger at the future point when the event is eventually released.


Examples

Local configuration

Use localConfigs to set delay locally for one generator.

{
"generators": [
{
"table": "orders",
"row": {
"orderId": {
"_gen": "uuid"
},
"orderDate": {
"_gen": "dateToday"
}
},
"localConfigs": {
"delay": {
"rate": 0.4,
"ms": 250
}
}
}
]
}

Global configuration

Use globalConfigs to set delay globally for all generators.

{
"generators": [
{
"table": "orders",
"row": {
"orderId": {
"_gen": "uuid"
},
"orderDate": {
"_gen": "dateToday"
}
}
}
],
"globalConfigs": {
"delay": {
"rate": 0.2,
"ms": 500
}
}
}

Specification

JSON schema

{
"type": "object",
"properties": {
"rate": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"ms": {
"oneOf": [
{
"type": "integer",
"minimum": 0
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
}
},
"required": [
"rate",
"ms"
]
}