add benchmarking for gcb

This commit is contained in:
Tejal Desai 2020-06-05 15:10:28 -07:00
parent 95a8ecc200
commit ba00c9fb7d
2 changed files with 16 additions and 1 deletions

View File

@ -166,6 +166,21 @@ Additionally, the integration tests can output benchmarking information to a `be
BENCHMARK=true go test -v --bucket $GCS_BUCKET --repo $IMAGE_REPO BENCHMARK=true go test -v --bucket $GCS_BUCKET --repo $IMAGE_REPO
``` ```
#### Benchmarking your GCB runs
If you are GCB builds are slow, you can check which phases in kaniko are bottlenecks or taking more time.
To do this, add "BENCHMARK_ENV" to your cloudbuild.yaml like this.
```shell script
steps:
- name: 'gcr.io/kaniko-project/executor:latest'
args:
- --build-arg=NUM=${_COUNT}
- --no-push
- --snapshotMode=redo
env:
- 'BENCHMARK_FILE=gs://$PROJECT_ID/gcb/benchmark_file'
```
You can download the file `gs://$PROJECT_ID/gcb/benchmark_file` using `gsutil cp` command.
## Creating a PR ## Creating a PR
When you have changes you would like to propose to kaniko, you will need to: When you have changes you would like to propose to kaniko, you will need to:

View File

@ -1,5 +1,5 @@
steps: steps:
- name: 'gcr.io/kaniko-project/executor:perf-latest' - name: 'gcr.io/kaniko-project/executor:latest'
args: args:
- --build-arg=NUM=${_COUNT} - --build-arg=NUM=${_COUNT}
- --no-push - --no-push