 |
Flowgrind
Advanced TCP traffic generator
|
Go to the documentation of this file.
37 #include <sys/types.h>
48 #define MAX_RUNS_PER_DISTRIBUTION 10
57 DEBUG_MSG(LOG_DEBUG,
"calculated normal distribution "
58 "value %f for parameters %f,%f", val,
59 param_one, param_two);
64 DEBUG_MSG(LOG_DEBUG,
"calculated uniform distribution "
70 DEBUG_MSG(LOG_DEBUG,
"calculated weibull distribution "
71 "value %f for parameters %f,%f", val,
72 param_one, param_two);
77 DEBUG_MSG(LOG_DEBUG,
"calculated exponential "
78 "distribution value %f for parameters %f",
84 DEBUG_MSG(LOG_DEBUG,
"calculated pareto distribution "
85 "value %f for parameters %f,%f", val,
86 param_one, param_two);
91 DEBUG_MSG(LOG_DEBUG,
"calculated lognormal "
92 "distribution value %f for parameters %f,%f",
93 val, param_one, param_two);
100 DEBUG_MSG(LOG_DEBUG,
"constant value %f", val);
126 DEBUG_MSG(LOG_WARNING,
"applied minimal request size limit %d "
127 "for flow %d", bs,
flow->
id);
132 DEBUG_MSG(LOG_WARNING,
"applied maximal request size limit %d "
133 "for flow %d", bs,
flow->
id);
137 DEBUG_MSG(LOG_NOTICE,
"calculated request size %d for flow %d after %d "
155 DEBUG_MSG(LOG_WARNING,
"applied minimal response size limit "
156 "%d for flow %d", bs,
flow->
id);
160 DEBUG_MSG(LOG_WARNING,
"applied maximal response size limit "
161 "%d for flow %d", bs,
flow->
id);
166 DEBUG_MSG(LOG_NOTICE,
"calculated response size %d for flow "
186 DEBUG_MSG(LOG_NOTICE,
"calculated next interpacket gap %.6fs "
187 "for flow %d", gap,
flow->
id);
@ UNIFORM
Uniform distribution.
#define DEBUG_MSG(LVL, MSG,...)
Print debug message to standard error.
enum distribution_t distribution
The stochastic distribution to draw values from.
int next_response_block_size(struct flow *flow)
double dist_normal(struct flow *flow, const double mu, const double sigma_square)
@ PARETO
Pareto distribution.
double param_two
Second mathematical parameter of the distribution, if required.
struct trafgen_options response_trafgen_options
Stochastic traffic generation settings for the response size.
struct flow_settings settings
double dist_weibull(struct flow *flow, const double alpha, const double beta)
struct trafgen_options interpacket_gap_trafgen_options
Stochastic traffic generation settings for the interpacket gap.
double dist_uniform(struct flow *flow, const double minval, const double maxval)
distribution_t
Stochastic distributions for traffic generation.
#define MAX_RUNS_PER_DISTRIBUTION
int maximum_block_size
Application buffer size in bytes (option -U).
@ LOGNORMAL
Log Normal distribution.
@ CONSTANT
No stochastic distribution.
@ WEIBULL
Weibull distribution.
#define MIN_BLOCK_SIZE
Minium block (message) size we can send.
int write_rate
The actual rate we should send.
@ EXPONENTIAL
Exponential distribution.
double dist_exponential(struct flow *flow, const double mu)
double dist_pareto(struct flow *flow, const double k, const double x_min)
double next_interpacket_gap(struct flow *flow)
int next_request_block_size(struct flow *flow)
Routines used by the Flowgrind daemon for advanced traffic generation.
static double calculate(struct flow *flow, enum distribution_t type, double param_one, double param_two)
double param_one
First mathemathical parameter of the distribution.
@ NORMAL
Normal distribution.
Routines for statistics and advanced traffic generation.
struct trafgen_options request_trafgen_options
Stochastic traffic generation settings for the request size.
Debugging routines for Flowgrind controller and daemon.
Routines used by the Flowgrind daemon.