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
fb4366b1
Commit
fb4366b1
authored
Apr 02, 2015
by
Robert Bailey
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6390 from satnam6502/serve_hostnames
Adjust defaults and reporting for serve_hostnames
parents
b6f6de15
1c2a903e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
serve_hostnames.go
test/soak/serve_hostnames/serve_hostnames.go
+5
-6
No files found.
test/soak/serve_hostnames/serve_hostnames.go
View file @
fb4366b1
...
...
@@ -40,7 +40,7 @@ import (
)
var
(
queriesAverage
=
flag
.
Int
(
"queries"
,
2
0
,
"Number of hostname queries to make in each iteration per pod on average"
)
queriesAverage
=
flag
.
Int
(
"queries"
,
10
0
,
"Number of hostname queries to make in each iteration per pod on average"
)
podsPerNode
=
flag
.
Int
(
"pods_per_node"
,
1
,
"Number of serve_hostname pods per node"
)
upTo
=
flag
.
Int
(
"up_to"
,
1
,
"Number of iterations or -1 for no limit"
)
maxPar
=
flag
.
Int
(
"max_par"
,
500
,
"Maximum number of queries in flight"
)
...
...
@@ -264,7 +264,7 @@ func main() {
inFlight
:=
make
(
chan
struct
{},
*
maxPar
)
start
:=
time
.
Now
()
for
q
:=
0
;
q
<
queries
;
q
++
{
go
func
()
{
go
func
(
i
int
,
query
int
)
{
inFlight
<-
struct
{}{}
t
:=
time
.
Now
()
hostname
,
err
:=
c
.
Get
()
.
...
...
@@ -274,8 +274,6 @@ func main() {
Name
(
"serve-hostnames"
)
.
DoRaw
()
glog
.
V
(
4
)
.
Infof
(
"Proxy call in namespace %s took %v"
,
ns
,
time
.
Since
(
t
))
i
:=
iteration
query
:=
q
if
err
!=
nil
{
glog
.
Warningf
(
"Call failed during iteration %d query %d : %v"
,
i
,
query
,
err
)
// If the query failed return a string which starts with a character
...
...
@@ -285,7 +283,7 @@ func main() {
responseChan
<-
string
(
hostname
)
}
<-
inFlight
}()
}(
iteration
,
q
)
}
responses
:=
make
(
map
[
string
]
int
,
*
podsPerNode
*
len
(
nodes
.
Items
))
missing
:=
0
...
...
@@ -312,6 +310,7 @@ func main() {
}
}
}
glog
.
Infof
(
"Iteration %d took %v for %d queries (%.2f QPS)"
,
iteration
,
time
.
Since
(
start
),
queries
,
float64
(
queries
)
/
time
.
Since
(
start
)
.
Seconds
())
glog
.
Infof
(
"Iteration %d took %v for %d queries (%.2f QPS) with %d missing"
,
iteration
,
time
.
Since
(
start
),
queries
-
missing
,
float64
(
queries
-
missing
)
/
time
.
Since
(
start
)
.
Seconds
(),
missing
)
}
}
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