generate

Generates flow records from histograms or mixture models.

usage: python3 -m flow_models.generate [-h] [-s S] [--seed SEED]
                                       [-x {length,size,duration,rate}]
                                       [-o {csv_flow,binary,append,extend,none}]
                                       [-O O]
                                       file

Positional Arguments

file

csv_hist file or mixture directory

Named Arguments

-s

number of generated flows

Default: 1

--seed

seed

-x

Possible choices: length, size, duration, rate

x axis value

Default: 'length'

-o

Possible choices: csv_flow, binary, append, extend, none

format of output

Default: 'csv_flow'

-O

file or directory for output

Default: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>

This tool can be used to generate example flow tuples from mixture or histogram file.

Generated flow stream will preserve distribution of flow features (length, size).

Example:

flow_models.generate -s 1000 histograms/udp/length.csv

In order to be used for benchmarking network mechanisms, models must enable the generation of traffic matching the mixtures. The tool generate provides a reference for how to properly generate flows from distribution mixtures. It takes a path to the directory containing JSON mixture models as input and outputs flow records. Additionally, a CSV histogram file can be used instead of a mixture model as an input, to generate flows exactly matching the particular dataset.