Categorygithub.com/EliriaT/go-tasks
modulepackage
0.0.0-20240423065740-64684896e9cb
Repository: https://github.com/eliriat/go-tasks.git
Documentation: pkg.go.dev

# README

go-tasks

Benchmark results:

img.png

From the cpu profiler results we can see that filterCampaignsViaSlice takes much more time to run in comparing to filterCampaignsViaMap (11.61 vs 6.93s)

img.png

A more comprehensive graph:

img.png

img.png

Memory profile results: img.png

img_1.png

To run the benchmark test: cd api

go test -bench=. -benchtime 5s -benchmem

Queries are in hw1.sql

Schema generation code is in db/migrations folder

Seeding was done in an overcomplicated way.

To run the tasks:

  1. docker compose build
  2. docker compose up

Running docker compose up will run all the migrations, seeding.

Database available at: user:password@tcp(sources_db:3306)/sources

Useful commands:

To start the mariadb client inside the sources_db container: docker exec -it sources_db mariadb -uusername -ppassword

To run the migrations: make migrateup

To rollback the migrations: make migratedown

To build the go image: docker compose build

To run the small environment: docker compose up --remove-orphans

To create several migration files: make create_migration create_sources_associated_campaigns_table create_sources_table

# Packages

No description provided by the author
No description provided by the author