Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
f30c62e3
Verified
Commit
f30c62e3
authored
2 years ago
by
Denis Smirnov
Browse files
Options
Downloads
Patches
Plain Diff
feat(stress test): improve the amount of routers
parent
f76e9c2d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1414
sbroad import
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
stress-test/target_data/scenario.js
+18
-2
18 additions, 2 deletions
stress-test/target_data/scenario.js
test_app/instances.yml
+21
-1
21 additions, 1 deletion
test_app/instances.yml
test_app/replicasets.yml
+26
-2
26 additions, 2 deletions
test_app/replicasets.yml
with
65 additions
and
5 deletions
stress-test/target_data/scenario.js
+
18
−
2
View file @
f30c62e3
import
tarantool
from
"
k6/x/tarantool
"
;
import
{
randomItem
}
from
'
https://jslib.k6.io/k6-utils/1.1.0/index.js
'
;
const
client
=
tarantool
.
connect
(
"
localhost:3301
"
,
{
"
user
"
:
"
admin
"
,
pass
:
"
app-cluster-cookie
"
})
const
clients
=
[
tarantool
.
connect
(
"
localhost:3301
"
,
{
"
user
"
:
"
admin
"
,
pass
:
"
app-cluster-cookie
"
}),
tarantool
.
connect
(
"
localhost:3306
"
,
{
"
user
"
:
"
admin
"
,
pass
:
"
app-cluster-cookie
"
}),
tarantool
.
connect
(
"
localhost:3307
"
,
{
"
user
"
:
"
admin
"
,
pass
:
"
app-cluster-cookie
"
}),
tarantool
.
connect
(
"
localhost:3308
"
,
{
"
user
"
:
"
admin
"
,
pass
:
"
app-cluster-cookie
"
})
]
export
let
current_server
=
0
function
get_client
()
{
let
c
=
clients
[
current_server
]
current_server
+=
1
if
(
current_server
>=
clients
.
length
)
{
current_server
=
0
}
return
c
}
let
ids
=
Array
.
from
(
{
...
...
@@ -21,5 +37,5 @@ const pattern = `SELECT *
WHERE "reestrid" = ?`
export
default
()
=>
{
tarantool
.
call
(
client
,
"
query
"
,
[
pattern
,
[
randomItem
(
ids
)]]);
tarantool
.
call
(
get_
client
()
,
"
query
"
,
[
pattern
,
[
randomItem
(
ids
)]]);
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test_app/instances.yml
+
21
−
1
View file @
f30c62e3
---
test_app.router
:
test_app.router
-1
:
advertise_uri
:
localhost:3301
http_port
:
8081
readahead
:
16711680
test_app.router-2
:
advertise_uri
:
localhost:3306
http_port
:
8086
readahead
:
16711680
test_app.router-3
:
advertise_uri
:
localhost:3307
http_port
:
8087
readahead
:
16711680
test_app.router-4
:
advertise_uri
:
localhost:3308
http_port
:
8088
readahead
:
16711680
test_app.s1-master
:
advertise_uri
:
localhost:3302
http_port
:
8082
readahead
:
16711680
test_app.s1-replica
:
advertise_uri
:
localhost:3303
http_port
:
8083
readahead
:
16711680
test_app.s2-master
:
advertise_uri
:
localhost:3304
http_port
:
8084
readahead
:
16711680
test_app.s2-replica
:
advertise_uri
:
localhost:3305
http_port
:
8085
readahead
:
16711680
test_app-stateboard
:
listen
:
localhost:4401
...
...
This diff is collapsed.
Click to expand it.
test_app/replicasets.yml
+
26
−
2
View file @
f30c62e3
router
:
router
-1
:
instances
:
-
router
-
router-1
roles
:
-
failover-coordinator
-
vshard-router
-
app.roles.api
all_rw
:
false
router-2
:
instances
:
-
router-2
roles
:
-
failover-coordinator
-
vshard-router
-
app.roles.api
all_rw
:
false
router-3
:
instances
:
-
router-3
roles
:
-
failover-coordinator
-
vshard-router
-
app.roles.api
all_rw
:
false
router-4
:
instances
:
-
router-4
roles
:
-
failover-coordinator
-
vshard-router
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment