This project requires you to use a GoLang template to implement a RESTful API, perform unit testing, containerize the application with Docker, perform load testing, and profile the application using pprof
. This document guides you through each task.
- GoLang
- Docker
- Grafana
- Make
- Basic knowledge about REST APIs, Unit Testing, Load Testing, and Profiling
In the app-no-implementation/internal/usecase
package, implement the REST endpoints.
Create a new file app-no-implementation/internal/usecase/user_test.go
and write the unit tests for the REST endpoints you have created in the previous task.
Use the Docker Compose command to build and run your app:
docker-compose up --build -d
Modify the app-no-implementation/scripts/load-test.sh script as necessary to perform load testing.
Open Grafana to monitor the load test results at http://localhost:8088/grafana. Analyze the logs and dashboards to understand the performance of your app.
Follow the pprof guide on the Go blog - https://go.dev/blog/pprof, implement profiling for your GoLang app and analyze the data.
- All APIs are working correctly.
- No errors are returned when you run the make lint command.
- All tests pass when you run go test -v ./....