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
aa93e2bb
Commit
aa93e2bb
authored
Jan 30, 2019
by
Krzysztof Siedlecki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reverting test to apiserver_request_latencies_summary metric
parent
529785e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
metrics_util.go
test/e2e/framework/metrics_util.go
+7
-5
No files found.
test/e2e/framework/metrics_util.go
View file @
aa93e2bb
...
@@ -137,7 +137,9 @@ var SchedulingLatencyMetricName = model.LabelValue(schedulermetric.SchedulerSubs
...
@@ -137,7 +137,9 @@ var SchedulingLatencyMetricName = model.LabelValue(schedulermetric.SchedulerSubs
var
InterestingApiServerMetrics
=
[]
string
{
var
InterestingApiServerMetrics
=
[]
string
{
"apiserver_request_total"
,
"apiserver_request_total"
,
"apiserver_request_latency_seconds_summary"
,
// TODO(krzysied): apiserver_request_latencies_summary is a deprecated metric.
// It should be replaced with new metric.
"apiserver_request_latencies_summary"
,
"etcd_helper_cache_entry_total"
,
"etcd_helper_cache_entry_total"
,
"etcd_helper_cache_hit_total"
,
"etcd_helper_cache_hit_total"
,
"etcd_helper_cache_miss_total"
,
"etcd_helper_cache_miss_total"
,
...
@@ -475,9 +477,9 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
...
@@ -475,9 +477,9 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
for
_
,
sample
:=
range
samples
{
for
_
,
sample
:=
range
samples
{
// Example line:
// Example line:
// apiserver_request_latenc
y_seconds_summary{resource="namespaces",verb="LIST",quantile="0.99"} 0.000
908
// apiserver_request_latenc
ies_summary{resource="namespaces",verb="LIST",quantile="0.99"}
908
// apiserver_request_total{resource="pods",verb="LIST",client="kubectl",code="200",contentType="json"} 233
// apiserver_request_total{resource="pods",verb="LIST",client="kubectl",code="200",contentType="json"} 233
if
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_latenc
y_second
s_summary"
&&
if
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_latenc
ie
s_summary"
&&
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_total"
{
sample
.
Metric
[
model
.
MetricNameLabel
]
!=
"apiserver_request_total"
{
continue
continue
}
}
...
@@ -491,13 +493,13 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
...
@@ -491,13 +493,13 @@ func readLatencyMetrics(c clientset.Interface) (*APIResponsiveness, error) {
}
}
switch
sample
.
Metric
[
model
.
MetricNameLabel
]
{
switch
sample
.
Metric
[
model
.
MetricNameLabel
]
{
case
"apiserver_request_latenc
y_second
s_summary"
:
case
"apiserver_request_latenc
ie
s_summary"
:
latency
:=
sample
.
Value
latency
:=
sample
.
Value
quantile
,
err
:=
strconv
.
ParseFloat
(
string
(
sample
.
Metric
[
model
.
QuantileLabel
]),
64
)
quantile
,
err
:=
strconv
.
ParseFloat
(
string
(
sample
.
Metric
[
model
.
QuantileLabel
]),
64
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
a
.
addMetricRequestLatency
(
resource
,
subresource
,
verb
,
scope
,
quantile
,
time
.
Duration
(
int64
(
latency
))
*
time
.
S
econd
)
a
.
addMetricRequestLatency
(
resource
,
subresource
,
verb
,
scope
,
quantile
,
time
.
Duration
(
int64
(
latency
))
*
time
.
Micros
econd
)
case
"apiserver_request_total"
:
case
"apiserver_request_total"
:
count
:=
sample
.
Value
count
:=
sample
.
Value
a
.
addMetricRequestCount
(
resource
,
subresource
,
verb
,
scope
,
int
(
count
))
a
.
addMetricRequestCount
(
resource
,
subresource
,
verb
,
scope
,
int
(
count
))
...
...
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