You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To improve our CI testing we can add a CPU/memory profile capturing for each NSM application via docker target stage. This will allow us to detect memory/cpu regressions or improvements.
Implementation details
Add for each application a new target ci
FROM go as ci
WORKDIR /build
COPY go.mod go.sum ./
COPY ./internal/imports imports
RUN go build ./imports
COPY . .
# TODO: Consider about adding a race flag
RUN go build -tags=ci -o /bin/app .
# TODO: correct this:
ENTRYPOINT ["go", "tool pprof app profile.output"]
Add build tags based main.go for the application that will include import _ "net/http/pprof"
denis-tingaikin
changed the title
Add ci docker image target for each application to capture memory and cpu usage
Add go profiling for CI NSM images
Feb 1, 2022
To improve our CI testing we can add a CPU/memory profile capturing for each NSM application via docker target stage. This will allow us to detect memory/cpu regressions or improvements.
Implementation details
ci
import _ "net/http/pprof"
/ci
with --target ciprofile.output
into https://github.com/networkservicemesh/integration-tests/tree/main/extensions/logs on test cleanup as CI artifact.The text was updated successfully, but these errors were encountered: