Print

Generator

The BENCH plugin is a number generator that sends data in a never-ending loop, for development and testing purposes.
The loop-increased numeric dummies are not realistic world scenarios but help test your window and query statements.

BENCH is only available in on-prem deployments. It’s not available on cloud instances.

Access Rule

Requires STREAM or ADMIN role.

Syntax

input bench (
   ceiling <positive number> 
   increment <positive number>
   interval <integer representing milliseconds>
   string_fields <integer representing how many string columns>
   string_values '<string values separated by | >'
)

Example

create stream my_bench_stream (
   symbol string,
   bid number
) 
input bench (
   ceiling 50 
   increment 1 
   interval 500 
   string_fields 1
   string_values 'SPY|APPL|TSLA' 
)
parser delimited ( 
   delimiter '	'  # a tab
);

Without INTERVAL to make it super fast:

create stream my_bench_stream_fast (
  symbol string,
  bid number
) 
input bench (
  ceiling 5000000 
  increment 1 
  string_fields 1
  string_values 'SPY|APPL|TSLA|GOOG' 
)
parser delimited ( 
  delimiter '	'  # a tab
);

More details about various INPUT plugins and PARSER plugins are available in the PLUGINS section of the RioDB docs.

Note, if you want to observe your queries handling the very first message, then you can use SYSTEM STOP; then create your streams, windows, and queries, and finally use SYSTEM START; so that your queries will be ready when the first message is produced by BENCH.

Table of Contents
Scroll to Top