Random

Description

Emits a randomly generated value on every polling interval. Useful for exercising the pipeline and Destinations without any robot infrastructure — the simplest possible Measurement plugin, and a deterministic, infrastructure-free Record source for load and backpressure testing.

Parameters

ParameterDescriptionTypeDefault
typeType of the generated value: integer or doublestr"integer" (Optional)
minMinimum value (inclusive) of the generated rangedouble0.0 (Optional)
maxMaximum value of the generated range (inclusive for integer, effectively exclusive for double). Must be greater than mindouble100.0 (Optional)
seedSeed for the random number generator. A negative value seeds from a non-deterministic source; a non-negative value makes runs reproducibleint-1 (Optional)

Schema

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Random",
    "description": "Randomly generated value",
    "properties": {
        "value": {
            "description": "Randomly generated value within the configured range",
            "type": "number"
        }
    },
    "type": "object"
}

Configuration

...
random:
  plugin: "dc_measurements/Random"
  topic_output: "/dc/measurement/random"
  type: "double"
  min: 0.0
  max: 1.0
  seed: 42

Example output

{
  "flattened": false,
  "name": "random",
  "nested": false,
  "run_id": "169",
  "value": 0.8265497558024156
}