Change barChart color and add benchmark description to docs of benchmark

pull/11140/head
Kenta Iso 2021-04-30 06:41:44 +09:00
parent 4b5fbf1827
commit 43b1dfd433
7 changed files with 17 additions and 13 deletions

2
go.mod
View File

@ -87,8 +87,8 @@ require (
golang.org/x/sys v0.0.0-20210412220455-f1c623a9e750
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72
golang.org/x/text v0.3.6
google.golang.org/api v0.45.0
gonum.org/v1/plot v0.9.0
google.golang.org/api v0.45.0
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
gopkg.in/yaml.v2 v2.4.0
gotest.tools/v3 v3.0.3 // indirect

View File

@ -19,6 +19,7 @@ package main
import (
"encoding/csv"
"fmt"
"image/color"
"log"
"math"
"os"
@ -131,9 +132,9 @@ func execute() error {
// Set border of the bar graph. 0 is no border color
barNAP.LineStyle.Width = vg.Length(0)
// Add bar name
p.Legend.Add("Initial start CPU usage", barNAP)
// Set bar color. 2 is blue
barNAP.Color = plotutil.Color(2)
p.Legend.Add("Initial Start CPU usage Before Pause", barNAP)
// Set bar color to gray.
barNAP.Color = color.RGBA{184, 184, 184, 255}
// Create Bar instance with auto-pause benchmark results
barAP, err := plotter.NewBarChart(plotter.Values(apResults), breadth)
@ -144,7 +145,7 @@ func execute() error {
// Set border of the bar graph. 0 is no border color
barAP.LineStyle.Width = vg.Length(0)
// Add bar name
p.Legend.Add("Auto-paused CPU usage", barAP)
p.Legend.Add("Auto Paused CPU usage", barAP)
// Set bar color. 1 is green
barAP.Color = plotutil.Color(1)
@ -162,7 +163,6 @@ func execute() error {
} else if runtime.GOOS == "linux" {
p.NominalX("OS idle", "minikube kvm2", "minikube virtualbox", "minikube docker", "Docker idle", "k3d", "kind")
}
p.X.Label.Text = "Tools"
// Set non-autopause data label to each bar
var napLabels []string

View File

@ -119,7 +119,6 @@ func execute() error {
} else if runtime.GOOS == "linux" {
p.NominalX("OS idle", "minikube kvm2", "minikube virtualbox", "minikube docker", "Docker idle", "k3d", "kind")
}
p.X.Label.Text = "Tools"
// Set data label to each bar
var cpuLabels []string

View File

@ -8,7 +8,10 @@ weight: 1
This chart shows each tool's CPU busy overhead percentage.
After each tool's starting, we measured each tool's idle for 5 minutes.
This chart was measured only after the start without deploying any pods.
This chart was measured only after the start without deploying any pods.
1. start each local kubernetes tool
2. measure its cpu usage with [cstat](https://github.com/tstromberg/cstat)
![idleOnly](/images/benchmarks/cpuUsage/idleOnly/linux.png)
@ -19,15 +22,16 @@ https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-
This chart shows each tool's CPU busy overhead percentage with auto-pause addon.
The auto-pause is mechanism which reduce CPU busy usage by pausing kube-apiserver.
This chart was measured with the following steps.
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
We compare CPU usage after deploying sample application(nginx deployment) to all tools(including minikube and other tools).
This chart was measured with the following steps.
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
1. start each local kubernetes tool
2. deploy sample application(nginx deployment) to each tool
3. wait 1 minute without anything
4. measure No.3 idle CPU usage with [cstat](https://github.com/tstromberg/cstat)
5. if tool is minikube, enable auto-pause addon which pause control plane
6. if tool is minikube, wait 1 minute so that control plane will become Paused status(It takes 1 minute to become Pause status from Stopped status)
6. if tool is minikube, wait 1 minute so that control plane will become Paused status(It takes 1 minute to become Pause status from Stopped status)
7. if tool is minikube, verify if minikube control plane is paused
8. if tool is minikube, wait 3 minute without anything
9. if tool is minikube, measure No.8 idle CPU usage with [cstat](https://github.com/tstromberg/cstat)

View File

@ -19,8 +19,9 @@ This chart was measured only after the start without deploying any pods.
This chart shows each tool's CPU busy overhead percentage with auto-pause addon.
The auto-pause is mechanism which reduce CPU busy usage by pausing kube-apiserver.
This chart was measured with the following steps.
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
We compare CPU usage after deploying sample application(nginx deployment) to all tools(including minikube and other tools).
This chart was measured with the following steps.
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
1. start each local kubernetes tool
2. deploy sample application(nginx deployment) to each tool

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 33 KiB