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
c092e2c5
Commit
c092e2c5
authored
Jul 08, 2016
by
k8s-merge-robot
Committed by
GitHub
Jul 08, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #28466 from sttts/sttts-fix-benchmark-integration
Automatic merge from submit-queue Fix compilation of master_benchmark_test.go
parents
e7b92b9d
1f904647
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
master_benchmark_test.go
test/integration/master/master_benchmark_test.go
+9
-4
No files found.
test/integration/master/master_benchmark_test.go
View file @
c092e2c5
...
...
@@ -26,6 +26,7 @@ import (
"time"
"github.com/golang/glog"
"k8s.io/kubernetes/pkg/api"
client
"k8s.io/kubernetes/pkg/client/unversioned"
"k8s.io/kubernetes/pkg/fields"
"k8s.io/kubernetes/pkg/labels"
...
...
@@ -136,9 +137,10 @@ func BenchmarkPodList(b *testing.B) {
defer
func
()
{
glog
.
V
(
3
)
.
Infof
(
"Worker %d: Node %v listing pods took %v"
,
id
,
host
,
time
.
Since
(
now
))
}()
if
pods
,
err
:=
m
.
RestClient
.
Pods
(
ns
.
Name
)
.
List
(
labels
.
Everything
(),
fields
.
OneTermEqualSelector
(
client
.
PodHost
,
host
));
err
!=
nil
{
if
pods
,
err
:=
m
.
RestClient
.
Pods
(
ns
.
Name
)
.
List
(
api
.
ListOptions
{
LabelSelector
:
labels
.
Everything
(),
FieldSelector
:
fields
.
OneTermEqualSelector
(
api
.
PodHostField
,
host
),
});
err
!=
nil
{
return
err
}
else
if
len
(
pods
.
Items
)
<
podsPerNode
{
glog
.
Fatalf
(
"List retrieved %d pods, which is less than %d"
,
len
(
pods
.
Items
),
podsPerNode
)
...
...
@@ -178,7 +180,10 @@ func BenchmarkPodListEtcd(b *testing.B) {
defer
func
()
{
glog
.
V
(
3
)
.
Infof
(
"Worker %d: listing pods took %v"
,
id
,
time
.
Since
(
now
))
}()
pods
,
err
:=
m
.
RestClient
.
Pods
(
ns
.
Name
)
.
List
(
labels
.
Everything
(),
fields
.
Everything
())
pods
,
err
:=
m
.
RestClient
.
Pods
(
ns
.
Name
)
.
List
(
api
.
ListOptions
{
LabelSelector
:
labels
.
Everything
(),
FieldSelector
:
fields
.
Everything
(),
})
if
err
!=
nil
{
return
err
}
...
...
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