CI debugging using a reverse shell technique based on SSH.
Build, unit test build image using kaniko, integraiton test. THe nexus docker proxy is used as well as the nexus go proxy. Also for the normal build, a cache RWX PVC is used. |
||
---|---|---|
cmd | ||
integrationtest | ||
kubernetes | ||
licenses | ||
pkg | ||
static | ||
.dockerignore | ||
.gitignore | ||
compose.yaml | ||
Dockerfile.prod | ||
Dockerfile.test | ||
getbootstrapicons.sh | ||
go.mod | ||
go.sum | ||
Jenkinsfile | ||
LICENSE | ||
Makefile | ||
README.md | ||
render.sh | ||
teststats.sh |
- Environment
At least go version 1.21 so that it automatically downloads the correct version
go install github.com/a-h/templ/cmd/templ@latest
go install golang.org/x/pkgsite/cmd/pkgsite@latest
go install honnef.co/go/tools/cmd/staticcheck@v0.5.0
Profiling
go tool pprof -http :8081 http://localhost:8000/debug/pprof/profile?seconds=30
# sample for allocations
go tool pprof -http :8081 http://localhost:8000/debug/pprof/heap?seconds=10
# show all memory
go tool pprof -http :8081 --alloc_space http://localhost:8000/debug/pprof/heap
# sample_index values
# cpu: CPU time spent in each function
#alloc_objects: Number of allocated heap objects
#alloc_space: Amount of allocated heap memory
#inuse_objects: Number of heap objects in use at the time of profile collection
#inuse_space: Amount of heap memory in use at the time of profile collection
go tool pprof -http :8081 --sample_index=alloc_objects http://localhost:8000/debug/pprof/heap
go tool pprof -http :8081 http://localhost:8000/debug/pprof/goroutine