hatoo / oha

Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation.
MIT License
5.62k stars 138 forks source link

Incorrect Handling of -z Parameter During Load Testing #536

Closed 0x9bb1 closed 3 months ago

0x9bb1 commented 3 months ago

Description:

When using the -z parameter to set the duration of the load test, the tool currently closes connections before responding to all sent requests at the end of the specified time. The expected behavior is to handle and complete all outstanding requests before closing the connections once the time limit is reached.

Steps to Reproduce:

Run a load test using the -z parameter to set a specific duration (e.g., -z 1m).
Observe the behavior at the end of the specified duration.

Expected Behavior:

At the end of the specified time, the tool should complete processing all sent requests and then close the connections.

Actual Behavior:

The tool closes the connections immediately at the end of the specified time, without waiting to respond to all sent requests.

Environment:

oha 1.4.5

Attachments:

Error distribution: [10] aborted due to deadline

Additional Information:

This behavior affects the accuracy and reliability of the load testing results as it prematurely closes connections, leading to incomplete request processing.
0x9bb1 commented 3 months ago

my bad. just saw

When the duration is reached, ongoing requests are aborted and counted as "aborted due to deadline"