buildx icon indicating copy to clipboard operation
buildx copied to clipboard

pprof: take cpu and memory profiles by setting environment variables

Open jsternberg opened this issue 1 year ago • 1 comments

When run in standalone mode, the environment variables DOCKER_BUILDX_CPU_PROFILE and DOCKER_BUILDX_MEM_PROFILE will cause profiles to be written by the CLI.

jsternberg avatar Oct 17 '24 20:10 jsternberg

is this for 0.18.0?

dvdksn avatar Oct 22 '24 13:10 dvdksn

Refactored the run into a single function that calls runStandalone or runPlugin. The main reason for duplicating that code was because of the calls to os.Exit in the main function. We can tackle that with a future clean up since there are also some other places that I think call os.Exit when they shouldn't.

jsternberg avatar Oct 24 '24 14:10 jsternberg

@dvdksn For docs follow-up we could add https://github.com/docker/docs/pull/21214 to contributing docs.

crazy-max avatar Oct 25 '24 14:10 crazy-max