Coder Social home page Coder Social logo

stress-test's Introduction

Stress Test CLI

Description

This is a CLI system written in Go to perform load testing on a web service. It allows you to specify a service URL, the total number of requests, and the concurrency level to test the web service.

Usage

Make sure you have Go installed on your system. To run the project, follow these steps:

  1. Clone the repository to your system:

    git clone https://github.com/kameikay/stress-test.git
    
  2. Navigate to the project directory:

    cd your-repository
    
  3. Build the project:

    go build
    
  4. Execute the project, providing the service URL, the total number of requests, and the concurrency level:

    ./stress-test --url=http://example.com --requests=1000 --concurrency=10
    

Alternatively, you can run the project using Docker. Follow these steps:

  1. Pull the Docker image from Docker Hub:

    docker pull kameikay/stress-test:latest
    
  2. Run the Docker container, providing the necessary parameters:

    docker run kameikay/stress-test:latest --url=http://example.com --requests=1000 --concurrency=10
    

Parameters

  • --url: The URL of the service to be tested.
  • --requests: The total number of requests.
  • --concurrency: The number of simultaneous calls.

Report

After running the tests, the system generates a report with the following information:

  • Total time spent on execution
  • Total number of requests made
  • Number of requests with HTTP status 200
  • Distribution of other HTTP status codes (such as 404, 500, etc.)

Testing

The project includes unit tests to ensure the correct functionality of the features.

To run the tests, use the following command:

go test ./...

Dependencies

Make sure to install this dependency before running the project:

go mod tidy

Contributing

Contributions are welcome! If you find an issue or have any suggestions to improve this project, feel free to open an issue or submit a pull request.

stress-test's People

Contributors

kameikay avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.