Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
cfd8bd71
Unverified
Commit
cfd8bd71
authored
Jan 24, 2019
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
org id fix for load test
parent
6454de74
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
24 deletions
+37
-24
devenv/docker/loadtest/README.md
+19
-19
devenv/docker/loadtest/auth_token_test.js
+6
-2
devenv/docker/loadtest/modules/client.js
+6
-2
devenv/docker/loadtest/modules/util.js
+6
-1
No files found.
devenv/docker/loadtest/README.md
View file @
cfd8bd71
...
...
@@ -34,10 +34,10 @@ Example output:
output: -
script: src/auth_token_test.js
duration: 10s, iterations: -
vus: 2, max: 2
duration: 1
5m
0s, iterations: -
vus: 2,
max: 2
done
[==========================================================]
1
0s / 1
0s
done
[==========================================================]
1
5m0s / 15m
0s
█ user auth token
test
...
...
@@ -50,20 +50,20 @@ Example output:
✓ response status is 200
checks.....................: 100.00% ✓ 3
6
4 ✗ 0
data_received..............: 4
.0 MB 402
kB/s
data_sent..................: 12
0 kB 12
kB/s
group_duration.............:
avg
=
84.95ms
min
=
31.49ms
med
=
90.28ms
max
=
120.08ms p
(
90
)=
118.15ms p
(
95
)=
118.47
ms
http_req_blocked...........:
avg
=
1.
63ms
min
=
2.18µs
med
=
1.1ms
max
=
10.94ms p
(
90
)=
3.34ms p
(
95
)=
4.28
ms
http_req_connecting........:
avg
=
1.
37ms
min
=
0s
med
=
902.58µs
max
=
10.47ms p
(
90
)=
2.95ms p
(
95
)=
3.82
ms
http_req_duration..........:
avg
=
58.
61ms
min
=
3.86ms
med
=
60.49ms
max
=
114.21ms p
(
90
)=
92.61ms p
(
95
)=
100.17
ms
http_req_receiving.........:
avg
=
3
6µs
min
=
9.78µs
med
=
31.17µs
max
=
234.69µs p
(
90
)=
61.58µs p
(
95
)=
72.95
µs
http_req_sending...........:
avg
=
3
61.51µs
min
=
19.57µs
med
=
181.38µs
max
=
10.56ms p
(
90
)=
642.88µs p
(
95
)=
845.28µ
s
http_req_tls_handshaking...:
avg
=
0s
min
=
0s
med
=
0s
max
=
0s p
(
90
)=
0s p
(
95
)=
0s
http_req_waiting...........:
avg
=
5
8.22ms
min
=
3.8ms
med
=
59.7ms
max
=
114.09ms p
(
90
)=
92.45ms p
(
95
)=
100.02
ms
http_reqs..................: 3
82 38.199516
/s
iteration_duration.........:
avg
=
975.79ms
min
=
7.98µs
med
=
1.08s
max
=
1.11s p
(
90
)=
1.09s p
(
95
)=
1.11
s
iterations.................: 1
8 1.799977
/s
vus........................: 2
min
=
2
max
=
2
vus_max....................: 2
min
=
2
max
=
2
checks.....................: 100.00% ✓ 3
284
4 ✗ 0
data_received..............: 4
11 MB 457
kB/s
data_sent..................: 12
MB 14
kB/s
group_duration.............:
avg
=
95.64ms
min
=
16.42ms
med
=
94.35ms
max
=
307.52ms p
(
90
)=
137.78ms p
(
95
)=
146.75
ms
http_req_blocked...........:
avg
=
1.
27ms
min
=
942ns
med
=
610.08µs
max
=
48.32ms p
(
90
)=
2.92ms p
(
95
)=
4.25
ms
http_req_connecting........:
avg
=
1.
06ms
min
=
0s
med
=
456.79µs
max
=
47.19ms p
(
90
)=
2.55ms p
(
95
)=
3.78
ms
http_req_duration..........:
avg
=
58.
16ms
min
=
1ms
med
=
52.59ms
max
=
293.35ms p
(
90
)=
109.53ms p
(
95
)=
120.19
ms
http_req_receiving.........:
avg
=
3
8.98µs
min
=
6.43µs
med
=
32.55µs
max
=
16.2ms p
(
90
)=
64.63µs p
(
95
)=
78.8
µs
http_req_sending...........:
avg
=
3
28.66µs
min
=
8.09µs
med
=
110.77µs
max
=
44.13ms p
(
90
)=
552.65µs p
(
95
)=
1.09m
s
http_req_tls_handshaking...:
avg
=
0s
min
=
0s
med
=
0s
max
=
0s p
(
90
)=
0s p
(
95
)=
0s
http_req_waiting...........:
avg
=
5
7.79ms
min
=
935.02µs
med
=
52.15ms
max
=
293.06ms p
(
90
)=
109.04ms p
(
95
)=
119.71
ms
http_reqs..................: 3
4486 38.317775
/s
iteration_duration.........:
avg
=
1.09s
min
=
1.81µs
med
=
1.09s
max
=
1.3s p
(
90
)=
1.13s p
(
95
)=
1.14
s
iterations.................: 1
642 1.824444
/s
vus........................: 2
min
=
2
max
=
2
vus_max....................: 2
min
=
2
max
=
2
```
devenv/docker/loadtest/auth_token_test.js
View file @
cfd8bd71
...
...
@@ -11,9 +11,13 @@ const client = createClient(endpoint)
export
const
setup
=
()
=>
{
const
basicAuthClient
=
createBasicAuthClient
(
endpoint
,
'admin'
,
'admin'
);
createTestOrgIfNotExists
(
basicAuthClient
);
c
onst
orgId
=
c
reateTestOrgIfNotExists
(
basicAuthClient
);
const
datasourceId
=
createTestdataDatasourceIfNotExists
(
basicAuthClient
);
return
{
datasourceId
:
datasourceId
};
client
.
withOrgId
(
orgId
);
return
{
orgId
:
orgId
,
datasourceId
:
datasourceId
,
};
}
export
default
(
data
)
=>
{
...
...
devenv/docker/loadtest/modules/client.js
View file @
cfd8bd71
...
...
@@ -99,7 +99,9 @@ export const BaseClient = class BaseClient {
}
withUrl
(
subUrl
)
{
return
new
BaseClient
(
this
.
url
,
subUrl
);
let
c
=
new
BaseClient
(
this
.
url
,
subUrl
);
c
.
onBeforeRequest
=
this
.
onBeforeRequest
;
return
c
;
}
beforeRequest
(
params
)
{
...
...
@@ -163,7 +165,9 @@ export class BasicAuthClient extends BaseClient {
}
withUrl
(
subUrl
)
{
return
new
BasicAuthClient
(
this
.
url
,
subUrl
,
this
.
username
,
this
.
password
);
let
c
=
new
BasicAuthClient
(
this
.
url
,
subUrl
,
this
.
username
,
this
.
password
);
c
.
onBeforeRequest
=
this
.
onBeforeRequest
;
return
c
;
}
beforeRequest
(
params
)
{
...
...
devenv/docker/loadtest/modules/util.js
View file @
cfd8bd71
export
const
createTestOrgIfNotExists
=
(
client
)
=>
{
let
orgId
=
0
;
let
res
=
client
.
orgs
.
getByName
(
'k6'
);
if
(
res
.
status
===
404
)
{
res
=
client
.
orgs
.
create
(
'k6'
);
if
(
res
.
status
!==
200
)
{
throw
new
Error
(
'Expected 200 response status when creating org'
);
}
orgId
=
res
.
json
().
orgId
;
}
else
{
orgId
=
res
.
json
().
id
;
}
client
.
withOrgId
(
res
.
json
().
orgId
);
client
.
withOrgId
(
orgId
);
return
orgId
;
}
export
const
createTestdataDatasourceIfNotExists
=
(
client
)
=>
{
...
...
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