This project consists of two main components:
- A simple Java-based server that counts the frequency of words in the downloaded text files from Gutenberg project.
- A load testing tool that sends GET requests to this server to retrieve the frequency of words listed in "search_words.csv".
The goal is to measure and compare the latency and throughput of the server under different loads by varying the number of threads in the load testing tool.
- The server is implemented using Java's Networking API (no framework is used).
- It listens for HTTP GET requests and processes them to return the frequency of a specified word in
resources/*.txt
.
- The tool reads words from
resources/search_words.csv
and generates HTTP GET requests for each word. - It supports running multiple threads to simulate concurrent requests.
- The tool measures the latency (time taken for each request) and throughput (total requests completed in a time frame) for each run.
- Start the server application.
- Run the load testing tool with a specified number of threads (from 1 to 16).
- The tool will display the average latency and throughput for each run in the terminal.
Run PerformanceCheck.java
to see the results which will be displayed in a formatted table in the terminal, showing latency and throughput against the number of threads, comparing performance as follows:
- Single threaded Server & Single threaded Load testing tool
- Single threaded Server & Multi threaded Load testing tool
- Multi threaded Server & Single threaded Load testing tool
- Multi threaded Server & Multi threaded Load testing tool
- Ensure that the server is running before starting the load testing tool.
- The server and load testing tool are designed for educational purposes to demonstrate the effects of multithreading on performance.
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch:
git checkout -b feature/AmazingFeature
- Commit your Changes:
git commit -m 'Add some AmazingFeature'
- Push to the Branch:
git push origin feature/AmazingFeature
- Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.