Merge pull request #13052 from spowelljr/useAwsBucket
time-to-k8s: Store chart and JSON files in AWSpull/13055/head
commit
9c35d50e4a
|
|
@ -11,18 +11,16 @@ jobs:
|
|||
time-to-k8s-public-chart:
|
||||
if: github.repository == 'kubernetes/minikube'
|
||||
runs-on: ubuntu-20.04
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_DEFAULT_REGION: 'us-west-1'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{env.GO_VERSION}}
|
||||
stable: true
|
||||
- name: Set up Cloud SDK
|
||||
uses: google-github-actions/setup-gcloud@master
|
||||
with:
|
||||
project_id: ${{ secrets.GCP_PROJECT_ID }}
|
||||
service_account_key: ${{ secrets.GCP_TIME_TO_K8S_SA_KEY }}
|
||||
export_default_credentials: true
|
||||
- name: Benchmark time-to-k8s for Docker
|
||||
run: |
|
||||
./hack/benchmark/time-to-k8s/public-chart/public-chart.sh docker
|
||||
|
|
|
|||
|
|
@ -161,6 +161,8 @@ func createChart(benchmarks []benchmark, chartOutputPath string) {
|
|||
*xy = make(plotter.XYs, n)
|
||||
}
|
||||
|
||||
var maxTotal float64
|
||||
|
||||
for i, b := range benchmarks {
|
||||
date := float64(b.Date.Unix())
|
||||
xyValues := []struct {
|
||||
|
|
@ -181,6 +183,9 @@ func createChart(benchmarks []benchmark, chartOutputPath string) {
|
|||
xy.Y = xyValue.value
|
||||
xy.X = date
|
||||
}
|
||||
if b.Total > maxTotal {
|
||||
maxTotal = b.Total
|
||||
}
|
||||
}
|
||||
|
||||
p := plot.New()
|
||||
|
|
@ -190,7 +195,7 @@ func createChart(benchmarks []benchmark, chartOutputPath string) {
|
|||
p.X.Label.Text = "date"
|
||||
p.X.Tick.Marker = plot.TimeTicks{Format: "2006-01-02"}
|
||||
p.Y.Label.Text = "time (seconds)"
|
||||
p.Y.Max = 95
|
||||
p.Y.Max = maxTotal + 15
|
||||
|
||||
steps := []struct {
|
||||
xys plotter.XYs
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ set -e
|
|||
|
||||
# container-runtime (docker or containerd)
|
||||
RUNTIME="$1"
|
||||
BUCKET="s3://time-to-k8s"
|
||||
|
||||
install_minikube() {
|
||||
make
|
||||
|
|
@ -34,21 +35,25 @@ generate_chart() {
|
|||
go run ./hack/benchmark/time-to-k8s/public-chart/generate-chart.go --csv ./hack/benchmark/time-to-k8s/time-to-k8s-repo/output.csv --output ./chart.png --past-runs ./runs.json
|
||||
}
|
||||
|
||||
copy() {
|
||||
aws s3 cp "$1" "$2"
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
rm ./runs.json
|
||||
rm ./hack/benchmark/time-to-k8s/time-to-k8s-repo/output.csv
|
||||
rm ./chart.png
|
||||
}
|
||||
|
||||
gsutil -m cp "gs://minikube-time-to-k8s/$RUNTIME-runs.json" ./runs.json
|
||||
copy "$BUCKET/$RUNTIME-runs.json" ./runs.json
|
||||
|
||||
install_minikube
|
||||
|
||||
run_benchmark
|
||||
generate_chart
|
||||
|
||||
gsutil -m cp ./runs.json "gs://minikube-time-to-k8s/$RUNTIME-runs.json"
|
||||
gsutil -m cp ./runs.json "gs://minikube-time-to-k8s/$(date +'%Y-%m-%d')-$RUNTIME.json"
|
||||
gsutil -m cp ./chart.png "gs://minikube-time-to-k8s/$RUNTIME-chart.png"
|
||||
copy ./runs.json "$BUCKET/$RUNTIME-runs.json"
|
||||
copy ./runs.json "$BUCKET/$(date +'%Y-%m-%d')-$RUNTIME.json"
|
||||
copy ./chart.png "$BUCKET/$RUNTIME-chart.png"
|
||||
|
||||
cleanup
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ weight: -99999999
|
|||
|
||||
## Docker
|
||||
|
||||

|
||||

|
||||
|
||||
## Containerd
|
||||
|
||||

|
||||

|
||||
|
|
|
|||
Loading…
Reference in New Issue