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
b3deef2f
Commit
b3deef2f
authored
Jun 03, 2015
by
Filip Grzadkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Load test: set threshold for latency metrics and add periodic lists
parent
7e5019fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
load.go
test/e2e/load.go
+6
-4
No files found.
test/e2e/load.go
View file @
b3deef2f
...
@@ -83,10 +83,9 @@ var _ = Describe("Load capacity", func() {
...
@@ -83,10 +83,9 @@ var _ = Describe("Load capacity", func() {
// Verify latency metrics
// Verify latency metrics
// TODO: Update threshold to 1s once we reach this goal
// TODO: Update threshold to 1s once we reach this goal
// TODO: We should reset metrics before the test. Currently previous tests influence latency metrics.
// TODO: We should reset metrics before the test. Currently previous tests influence latency metrics.
_
,
err
:=
HighLatencyRequests
(
c
,
5
*
time
.
Second
,
util
.
NewStringSet
(
"events"
))
highLatencyRequests
,
err
:=
HighLatencyRequests
(
c
,
3
*
time
.
Second
,
util
.
NewStringSet
(
"events"
))
expectNoError
(
err
)
expectNoError
(
err
,
"Too many instances metrics above the threshold"
)
// TODO: uncomment the following line once the test is stable
Expect
(
highLatencyRequests
)
.
NotTo
(
BeNumerically
(
">"
,
0
))
// Expect(highLatencyRequests).NotTo(BeNumerically(">", 0))
})
})
type
Load
struct
{
type
Load
struct
{
...
@@ -156,6 +155,9 @@ func playWithRC(c *client.Client, wg *sync.WaitGroup, ns, name string, size int)
...
@@ -156,6 +155,9 @@ func playWithRC(c *client.Client, wg *sync.WaitGroup, ns, name string, size int)
// Scale RC to a random size between 0.5x and 1.5x of the original size.
// Scale RC to a random size between 0.5x and 1.5x of the original size.
newSize
:=
uint
(
rand
.
Intn
(
size
+
1
)
+
size
/
2
)
newSize
:=
uint
(
rand
.
Intn
(
size
+
1
)
+
size
/
2
)
expectNoError
(
ScaleRC
(
c
,
ns
,
name
,
newSize
),
fmt
.
Sprintf
(
"scaling rc %s in namespace %s"
,
name
,
ns
))
expectNoError
(
ScaleRC
(
c
,
ns
,
name
,
newSize
),
fmt
.
Sprintf
(
"scaling rc %s in namespace %s"
,
name
,
ns
))
// List all pods within this RC.
_
,
err
:=
c
.
Pods
(
ns
)
.
List
(
labels
.
SelectorFromSet
(
labels
.
Set
(
map
[
string
]
string
{
"name"
:
name
})),
fields
.
Everything
())
expectNoError
(
err
,
fmt
.
Sprintf
(
"listing pods from rc %v in namespace %v"
,
name
,
ns
))
// With probability 0.1 remove this RC.
// With probability 0.1 remove this RC.
if
rand
.
Intn
(
10
)
==
0
{
if
rand
.
Intn
(
10
)
==
0
{
expectNoError
(
DeleteRC
(
c
,
ns
,
name
),
fmt
.
Sprintf
(
"deleting rc %s in namespace %s"
,
name
,
ns
))
expectNoError
(
DeleteRC
(
c
,
ns
,
name
),
fmt
.
Sprintf
(
"deleting rc %s in namespace %s"
,
name
,
ns
))
...
...
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