This project aims to purpose a solution for the benchmaking problem proposed as a take home assignment for a Cloud Engineer position at Timescale The full problem description can be found here
This software was written in go lang (version 1.19) and uses docker containers to build up the development environment. Please make sure you have these softares already set to be able to run it.
To spin up a new timescale instance I created a docker-compose file with a timescale instance and also a pgadmin instance to be able to query the database without needing to install any client.
To run all the containers please execute:
make dev_start
Once the stack is up you can check the containers running
docker ps
You should see something similar to:
The timescale container is initialized with the cpu_usage.sql so you don't need to worry about database, extension or table creation. The only needed step is to populate the table with the provided csv file.
To populate the database please execute:
make db_setup
To run queries you can open pgadmin using the credentials valverde.thiago@gmail.com/t1m35c@13.
To configure the connection between pgadmin and timescale use the following settings:
Inside the source folder you can run the project using
go run main.go
Or simply runs the following from the root folder
cd src && go run main.go && cd ..
Any of the above commands will run the software with the default options (args). To customize them use the command as follows:
go run main.go -file="../query_params.csv" -workers=10
Or simply runs the following from the root folder
cd src && go run main.go -file="../query_params.csv" -workers=10 && cd ..
where: