Console based blackjack game.
To run the CPU and memory profiling, run the tests with the cpuprofile
and memprofile
flags.
# Assuming we are already in the directory with go.mod
go test -benchmem -run=^$ blackjack -bench "^(BenchmarkStartGame)$" -benchmem -cpuprofile cpu.out -memprofile mem.out
To view the profile data in browser, run the below command.
go tool pprof -http=:8080 cpu.out
go tool pprof -http=:8080 mem.out
- Run
gp env PIP_USER=false
so thatpre-commit
does not fail with errorCan not perform a '--user' install
. Related to gitpod-io/gitpod#1997