class Cryload::LoadGenerator

Defined in:

cryload/load_generator.cr

Constant Summary

BATCH_FLUSH_INTERVAL = 1.second
BATCH_FLUSH_SIZE = 250_i64
DURATION_DRAIN_GRACE = 500.milliseconds
PROGRESS_INTERVAL = 1.second

Constructors

Instance Method Summary

Constructor Detail

def self.new(host : String, request_number : Int32 | Nil = nil, connections : Int32 = 10, duration_seconds : Int32 | Nil = nil, output_format : String = "text", http_method : String = "GET", http_body : String | Nil = nil, http_headers : HTTP::Headers = HTTP::Headers.new, timeout_seconds : Int32 | Nil = nil, insecure : Bool = false, rate_limit : Int32 | Nil = nil, follow_redirects : Bool = false, success_status_ranges : Array(Range(Int32, Int32)) = [200..299], ci_thresholds : CiThresholds = CiThresholds.new, urls : Array(URI) = [] of URI, warmup_seconds : Int32 = 0, proxy : URI | Nil = nil, progress : Bool = true, random_path : Bool = false, disable_keepalive : Bool = false) #

Instance Method Detail

def generate_request_channel(worker_count) #

def spawn_duration_worker(stats_channel, done_channel, rate_limiter : RateLimiter | Nil) #

def spawn_receive_loop(stats_channel, done_channel, worker_count) #

def spawn_receive_loop_duration(stats_channel, done_channel, worker_count) #

def spawn_receive_loop_requests(stats_channel, done_channel, worker_count) #

def spawn_request_worker(stats_channel, done_channel, worker_index, total_workers, rate_limiter : RateLimiter | Nil) #