Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
30eb6882
Commit
30eb6882
authored
Aug 19, 2016
by
Zhou Fang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add peak (100%) lantecy and CPU usage in perf data
parent
95eb9efb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
13 deletions
+16
-13
metrics_util.go
test/e2e/framework/metrics_util.go
+6
-4
benchmark_util.go
test/e2e_node/benchmark_util.go
+8
-7
density_test.go
test/e2e_node/density_test.go
+1
-1
resource_collector.go
test/e2e_node/resource_collector.go
+1
-1
No files found.
test/e2e/framework/metrics_util.go
View file @
30eb6882
...
@@ -134,9 +134,10 @@ var InterestingKubeletMetrics = []string{
...
@@ -134,9 +134,10 @@ var InterestingKubeletMetrics = []string{
// Dashboard metrics
// Dashboard metrics
type
LatencyMetric
struct
{
type
LatencyMetric
struct
{
Perc50
time
.
Duration
`json:"Perc50"`
Perc50
time
.
Duration
`json:"Perc50"`
Perc90
time
.
Duration
`json:"Perc90"`
Perc90
time
.
Duration
`json:"Perc90"`
Perc99
time
.
Duration
`json:"Perc99"`
Perc99
time
.
Duration
`json:"Perc99"`
Perc100
time
.
Duration
`json:"Perc100"`
}
}
type
PodStartupLatency
struct
{
type
PodStartupLatency
struct
{
...
@@ -450,7 +451,8 @@ func ExtractLatencyMetrics(latencies []PodLatencyData) LatencyMetric {
...
@@ -450,7 +451,8 @@ func ExtractLatencyMetrics(latencies []PodLatencyData) LatencyMetric {
perc50
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
50
)
/
100
))
-
1
]
.
Latency
perc50
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
50
)
/
100
))
-
1
]
.
Latency
perc90
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
90
)
/
100
))
-
1
]
.
Latency
perc90
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
90
)
/
100
))
-
1
]
.
Latency
perc99
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
99
)
/
100
))
-
1
]
.
Latency
perc99
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
99
)
/
100
))
-
1
]
.
Latency
return
LatencyMetric
{
Perc50
:
perc50
,
Perc90
:
perc90
,
Perc99
:
perc99
}
perc100
:=
latencies
[
length
-
1
]
.
Latency
return
LatencyMetric
{
Perc50
:
perc50
,
Perc90
:
perc90
,
Perc99
:
perc99
,
Perc100
:
perc100
}
}
}
// LogSuspiciousLatency logs metrics/docker errors from all nodes that had slow startup times
// LogSuspiciousLatency logs metrics/docker errors from all nodes that had slow startup times
...
...
test/e2e_node/benchmark_util.go
View file @
30eb6882
...
@@ -27,7 +27,7 @@ import (
...
@@ -27,7 +27,7 @@ import (
)
)
const
(
const
(
// TODO(coufon): be consistent with perf_util.go version
(not exposed)
// TODO(coufon): be consistent with perf_util.go version
currentTimeSeriesVersion
=
"v1"
currentTimeSeriesVersion
=
"v1"
TimeSeriesTag
=
"[Result:TimeSeries]"
TimeSeriesTag
=
"[Result:TimeSeries]"
TimeSeriesEnd
=
"[Finish:TimeSeries]"
TimeSeriesEnd
=
"[Finish:TimeSeries]"
...
@@ -35,8 +35,8 @@ const (
...
@@ -35,8 +35,8 @@ const (
type
NodeTimeSeries
struct
{
type
NodeTimeSeries
struct
{
// value in OperationData is an array of timestamps
// value in OperationData is an array of timestamps
OperationData
map
[
string
][]
int64
`json:"op_
data
,omitempty"`
OperationData
map
[
string
][]
int64
`json:"op_
series
,omitempty"`
ResourceData
map
[
string
]
*
ResourceSeries
`json:"resource_
data
,omitempty"`
ResourceData
map
[
string
]
*
ResourceSeries
`json:"resource_
series
,omitempty"`
Labels
map
[
string
]
string
`json:"labels"`
Labels
map
[
string
]
string
`json:"labels"`
Version
string
`json:"version"`
Version
string
`json:"version"`
}
}
...
@@ -85,14 +85,15 @@ func getLatencyPerfData(latency framework.LatencyMetric, testName string) *perft
...
@@ -85,14 +85,15 @@ func getLatencyPerfData(latency framework.LatencyMetric, testName string) *perft
DataItems
:
[]
perftype
.
DataItem
{
DataItems
:
[]
perftype
.
DataItem
{
{
{
Data
:
map
[
string
]
float64
{
Data
:
map
[
string
]
float64
{
"Perc50"
:
float64
(
latency
.
Perc50
)
/
1000000
,
"Perc50"
:
float64
(
latency
.
Perc50
)
/
1000000
,
"Perc90"
:
float64
(
latency
.
Perc90
)
/
1000000
,
"Perc90"
:
float64
(
latency
.
Perc90
)
/
1000000
,
"Perc99"
:
float64
(
latency
.
Perc99
)
/
1000000
,
"Perc99"
:
float64
(
latency
.
Perc99
)
/
1000000
,
"Perc100"
:
float64
(
latency
.
Perc100
)
/
1000000
,
},
},
Unit
:
"ms"
,
Unit
:
"ms"
,
Labels
:
map
[
string
]
string
{
Labels
:
map
[
string
]
string
{
"datatype"
:
"latency"
,
"datatype"
:
"latency"
,
"latencytype"
:
"
test-e2e
"
,
"latencytype"
:
"
create-pod
"
,
},
},
},
},
},
},
...
...
test/e2e_node/density_test.go
View file @
30eb6882
...
@@ -372,7 +372,7 @@ func runDensitySeqTest(f *framework.Framework, rc *ResourceCollector, testArg de
...
@@ -372,7 +372,7 @@ func runDensitySeqTest(f *framework.Framework, rc *ResourceCollector, testArg de
rc
.
Start
()
rc
.
Start
()
defer
rc
.
Stop
()
defer
rc
.
Stop
()
//
create pods sequentially (back-to-back)
//
Create pods sequentially (back-to-back). e2eLags have been sorted.
batchlag
,
e2eLags
:=
createBatchPodSequential
(
f
,
testPods
)
batchlag
,
e2eLags
:=
createBatchPodSequential
(
f
,
testPods
)
// Log throughput data.
// Log throughput data.
...
...
test/e2e_node/resource_collector.go
View file @
30eb6882
...
@@ -206,7 +206,7 @@ func (r resourceUsageByCPU) Swap(i, j int) { r[i], r[j] = r[j], r[i] }
...
@@ -206,7 +206,7 @@ func (r resourceUsageByCPU) Swap(i, j int) { r[i], r[j] = r[j], r[i] }
func
(
r
resourceUsageByCPU
)
Less
(
i
,
j
int
)
bool
{
return
r
[
i
]
.
CPUUsageInCores
<
r
[
j
]
.
CPUUsageInCores
}
func
(
r
resourceUsageByCPU
)
Less
(
i
,
j
int
)
bool
{
return
r
[
i
]
.
CPUUsageInCores
<
r
[
j
]
.
CPUUsageInCores
}
// The percentiles to report.
// The percentiles to report.
var
percentiles
=
[
...
]
float64
{
0.
05
,
0.20
,
0.50
,
0.70
,
0.90
,
0.95
,
0.99
}
var
percentiles
=
[
...
]
float64
{
0.
50
,
0.90
,
0.95
,
0.99
,
1.00
}
// GetBasicCPUStats returns the percentiles the cpu usage in cores for
// GetBasicCPUStats returns the percentiles the cpu usage in cores for
// containerName. This method examines all data currently in the buffer.
// containerName. This method examines all data currently in the buffer.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment