class Cryload::LoadGenerator
- Cryload::LoadGenerator
- Reference
- Object
Overview
LoadGenerator is the main class in Cryload. It's responsible for generating the requests and other major stuff.
Defined in:
cryload.crConstructors
-
.new(host : String, request_number : Int32)
LoadGenerator accepts two params.
Instance Method Summary
-
#generate_request_channel
Generates a Channel for asynchronously sending HTTP requests.
-
#spawn_receive_loop(channel)
Spawns the receiver loop which listens the send events from channel.
-
#spawn_request_loop(channel)
Spawns the main loop which creates the HTTP client.
Constructor Detail
Instance Method Detail
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.
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.