Skip to content

Commit 43b1dfd

Browse files
committed
Change barChart color and add benchmark description to docs of benchmark
1 parent 4b5fbf1 commit 43b1dfd

File tree

7 files changed

+17
-13
lines changed

7 files changed

+17
-13
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ require (
8787
golang.org/x/sys v0.0.0-20210412220455-f1c623a9e750
8888
golang.org/x/term v0.0.0-20210406210042-72f3dc4e9b72
8989
golang.org/x/text v0.3.6
90-
google.golang.org/api v0.45.0
9190
gonum.org/v1/plot v0.9.0
91+
google.golang.org/api v0.45.0
9292
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
9393
gopkg.in/yaml.v2 v2.4.0
9494
gotest.tools/v3 v3.0.3 // indirect

hack/benchmark/cpu_usage/auto_pause/chart.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package main
1919
import (
2020
"encoding/csv"
2121
"fmt"
22+
"image/color"
2223
"log"
2324
"math"
2425
"os"
@@ -131,9 +132,9 @@ func execute() error {
131132
// Set border of the bar graph. 0 is no border color
132133
barNAP.LineStyle.Width = vg.Length(0)
133134
// Add bar name
134-
p.Legend.Add("Initial start CPU usage", barNAP)
135-
// Set bar color. 2 is blue
136-
barNAP.Color = plotutil.Color(2)
135+
p.Legend.Add("Initial Start CPU usage Before Pause", barNAP)
136+
// Set bar color to gray.
137+
barNAP.Color = color.RGBA{184, 184, 184, 255}
137138

138139
// Create Bar instance with auto-pause benchmark results
139140
barAP, err := plotter.NewBarChart(plotter.Values(apResults), breadth)
@@ -144,7 +145,7 @@ func execute() error {
144145
// Set border of the bar graph. 0 is no border color
145146
barAP.LineStyle.Width = vg.Length(0)
146147
// Add bar name
147-
p.Legend.Add("Auto-paused CPU usage", barAP)
148+
p.Legend.Add("Auto Paused CPU usage", barAP)
148149
// Set bar color. 1 is green
149150
barAP.Color = plotutil.Color(1)
150151

@@ -162,7 +163,6 @@ func execute() error {
162163
} else if runtime.GOOS == "linux" {
163164
p.NominalX("OS idle", "minikube kvm2", "minikube virtualbox", "minikube docker", "Docker idle", "k3d", "kind")
164165
}
165-
p.X.Label.Text = "Tools"
166166

167167
// Set non-autopause data label to each bar
168168
var napLabels []string

hack/benchmark/cpu_usage/idle_only/chart.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ func execute() error {
119119
} else if runtime.GOOS == "linux" {
120120
p.NominalX("OS idle", "minikube kvm2", "minikube virtualbox", "minikube docker", "Docker idle", "k3d", "kind")
121121
}
122-
p.X.Label.Text = "Tools"
123122

124123
// Set data label to each bar
125124
var cpuLabels []string

site/content/en/docs/benchmarks/cpuUsage/linux/_index.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ weight: 1
88

99
This chart shows each tool's CPU busy overhead percentage.
1010
After each tool's starting, we measured each tool's idle for 5 minutes.
11-
This chart was measured only after the start without deploying any pods.
11+
This chart was measured only after the start without deploying any pods.
12+
13+
1. start each local kubernetes tool
14+
2. measure its cpu usage with [cstat](https://github.com/tstromberg/cstat)
1215

1316
![idleOnly](/images/benchmarks/cpuUsage/idleOnly/linux.png)
1417

@@ -19,15 +22,16 @@ https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-
1922

2023
This chart shows each tool's CPU busy overhead percentage with auto-pause addon.
2124
The auto-pause is mechanism which reduce CPU busy usage by pausing kube-apiserver.
22-
This chart was measured with the following steps.
23-
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
25+
We compare CPU usage after deploying sample application(nginx deployment) to all tools(including minikube and other tools).
26+
This chart was measured with the following steps.
27+
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
2428

2529
1. start each local kubernetes tool
2630
2. deploy sample application(nginx deployment) to each tool
2731
3. wait 1 minute without anything
2832
4. measure No.3 idle CPU usage with [cstat](https://github.com/tstromberg/cstat)
2933
5. if tool is minikube, enable auto-pause addon which pause control plane
30-
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)
34+
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)
3135
7. if tool is minikube, verify if minikube control plane is paused
3236
8. if tool is minikube, wait 3 minute without anything
3337
9. if tool is minikube, measure No.8 idle CPU usage with [cstat](https://github.com/tstromberg/cstat)

site/content/en/docs/benchmarks/cpuUsage/macOS/_index.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ This chart was measured only after the start without deploying any pods.
1919

2020
This chart shows each tool's CPU busy overhead percentage with auto-pause addon.
2121
The auto-pause is mechanism which reduce CPU busy usage by pausing kube-apiserver.
22-
This chart was measured with the following steps.
23-
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
22+
We compare CPU usage after deploying sample application(nginx deployment) to all tools(including minikube and other tools).
23+
This chart was measured with the following steps.
24+
By these steps, we compare CPU usage with auto-pause vs. non-auto-pause.
2425

2526
1. start each local kubernetes tool
2627
2. deploy sample application(nginx deployment) to each tool
603 Bytes
Loading
-918 Bytes
Loading

0 commit comments

Comments
 (0)