class Cryload::LoadGenerator

Overview

LoadGenerator is the main class in Cryload. It's responsible for generating the requests and other major stuff.

Defined in:

cryload.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(host : String, request_number : Int32) #

LoadGenerator accepts two params.


[View source]

Instance Method Detail

def generate_request_channel #

Generates a Channel for asynchronously sending HTTP requests.


[View source]
def spawn_receive_loop(channel) #

Spawns the receiver loop which listens the send events from channel. This loop is also responsible for checking the logs and gathering stats about all the completed requests.


[View source]
def spawn_request_loop(channel) #

Spawns the main loop which creates the HTTP client. The HTTP clients sends HTTP::get requests to the specified host. It doesn't block the main program and send the completion of the request to channel.


[View source]