Limit Rate
The limit_rate hook discards samples in order to limit the sample rate to a certain rate.
The decision whether a sample is discarded or not is based on its timestamp.
Implementation
The source code of the hook is available here: https://github.com/VILLASframework/node/blob/master/lib/hooks/limit_rate.cpp
Configuration
| rate required | number The maximum sample rate in |
| mode | string Default: "local" Enum: "local" "received" "origin" Timestamp which should be used for rate estimation. |
| enabled | boolean Default: true An optional field which can be used to disable a hook. |
| priority | integer Default: 99 The priority of this hook which determines the order in which hooks are executed. Hooks with a lwoer priority are executed before ones with a higher priority. If no priority is configured, hooks are executed in the order they are configured in the configuration file. |
{- "rate": 0,
- "mode": "local",
- "enabled": true,
- "priority": 99
}Example
node/etc/examples/hooks/limit_rate.conf
@include "hook-nodes.conf"
paths = (
{
in = "signal_node"
out = "file_node"
hooks = (
{
type = "limit_rate"
rate = 5.5
}
)
}
)