build: add buildx pprof variables

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
David Karlsson 2024-10-22 15:15:07 +02:00
parent b1256d572f
commit adca07142a
1 changed files with 53 additions and 18 deletions

View File

@ -305,7 +305,7 @@ they aren't available inside the build and they have no relation to the `ENV` in
They're used to configure the Buildx client, or the BuildKit daemon. They're used to configure the Buildx client, or the BuildKit daemon.
| Variable | Type | Description | | Variable | Type | Description |
| --------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------- | | --------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------ |
| [BUILDKIT_COLORS](#buildkit_colors) | String | Configure text color for the terminal output. | | [BUILDKIT_COLORS](#buildkit_colors) | String | Configure text color for the terminal output. |
| [BUILDKIT_HOST](#buildkit_host) | String | Specify host to use for remote builders. | | [BUILDKIT_HOST](#buildkit_host) | String | Specify host to use for remote builders. |
| [BUILDKIT_PROGRESS](#buildkit_progress) | String | Configure type of progress output. | | [BUILDKIT_PROGRESS](#buildkit_progress) | String | Configure type of progress output. |
@ -315,10 +315,12 @@ They're used to configure the Buildx client, or the BuildKit daemon.
| [BUILDX_BAKE_GIT_SSH](#buildx_bake_git_ssh) | String | SSH authentication for remote Bake files. | | [BUILDX_BAKE_GIT_SSH](#buildx_bake_git_ssh) | String | SSH authentication for remote Bake files. |
| [BUILDX_BUILDER](#buildx_builder) | String | Specify the builder instance to use. | | [BUILDX_BUILDER](#buildx_builder) | String | Specify the builder instance to use. |
| [BUILDX_CONFIG](#buildx_config) | String | Specify location for configuration, state, and logs. | | [BUILDX_CONFIG](#buildx_config) | String | Specify location for configuration, state, and logs. |
| [BUILDX_CPU_PROFILE](#buildx_cpu_profile) | String | Generate a `pprof` CPU profile at the specified location. |
| [BUILDX_EXPERIMENTAL](#buildx_experimental) | Boolean | Turn on experimental features. | | [BUILDX_EXPERIMENTAL](#buildx_experimental) | Boolean | Turn on experimental features. |
| [BUILDX_GIT_CHECK_DIRTY](#buildx_git_check_dirty) | Boolean | Enable dirty Git checkout detection. | | [BUILDX_GIT_CHECK_DIRTY](#buildx_git_check_dirty) | Boolean | Enable dirty Git checkout detection. |
| [BUILDX_GIT_INFO](#buildx_git_info) | Boolean | Remove Git information in provenance attestations. | | [BUILDX_GIT_INFO](#buildx_git_info) | Boolean | Remove Git information in provenance attestations. |
| [BUILDX_GIT_LABELS](#buildx_git_labels) | String \| Boolean | Add Git provenance labels to images. | | [BUILDX_GIT_LABELS](#buildx_git_labels) | String \| Boolean | Add Git provenance labels to images. |
| [BUILDX_MEM_PROFILE](#buildx_mem_profile) | String | Generate a `pprof` memory profile at the specified location. |
| [BUILDX_NO_DEFAULT_ATTESTATIONS](#buildx_no_default_attestations) | Boolean | Turn off default provenance attestations. | | [BUILDX_NO_DEFAULT_ATTESTATIONS](#buildx_no_default_attestations) | Boolean | Turn off default provenance attestations. |
| [BUILDX_NO_DEFAULT_LOAD](#buildx_no_default_load) | Boolean | Turn off loading images to image store by default. | | [BUILDX_NO_DEFAULT_LOAD](#buildx_no_default_load) | Boolean | Turn off loading images to image store by default. |
| [EXPERIMENTAL_BUILDKIT_SOURCE_POLICY](#experimental_buildkit_source_policy) | String | Specify a BuildKit source policy file. | | [EXPERIMENTAL_BUILDKIT_SOURCE_POLICY](#experimental_buildkit_source_policy) | String | Specify a BuildKit source policy file. |
@ -507,6 +509,22 @@ Usage:
$ export BUILDX_CONFIG=/usr/local/etc $ export BUILDX_CONFIG=/usr/local/etc
``` ```
### BUILDX_CPU_PROFILE
{{< introduced buildx 0.18.0 >}}
If specified, Buildx generates a `pprof` CPU profile at the specified location.
> [!NOTE]
> This property is only useful for when developing Buildx. The profiling data
> is not relevant for analyzing a build's performance.
Usage:
```console
$ export BUILDX_CPU_PROFILE=buildx_cpu.prof
```
### BUILDX_EXPERIMENTAL ### BUILDX_EXPERIMENTAL
Enables experimental build features. Enables experimental build features.
@ -572,6 +590,23 @@ Usage:
If the repository is in a dirty state, the `revision` gets a `-dirty` suffix. If the repository is in a dirty state, the `revision` gets a `-dirty` suffix.
### BUILDX_MEM_PROFILE
{{< introduced buildx 0.18.0 >}}
If specified, Buildx generates a `pprof` memory profile at the specified
location.
> [!NOTE]
> This property is only useful for when developing Buildx. The profiling data
> is not relevant for analyzing a build's performance.
Usage:
```console
$ export BUILDX_MEM_PROFILE=buildx_mem.prof
```
### BUILDX_NO_DEFAULT_ATTESTATIONS ### BUILDX_NO_DEFAULT_ATTESTATIONS
{{< introduced buildx 0.10.4 "../release-notes.md#0104" >}} {{< introduced buildx 0.10.4 "../release-notes.md#0104" >}}