Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
96f37c2c
Commit
96f37c2c
authored
Jan 02, 2018
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability_test: refactor test suite urls generation
parent
eaa427f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
scalability_test/__init__.py
scalability_test/__init__.py
+14
-12
No files found.
scalability_test/__init__.py
View file @
96f37c2c
...
@@ -16,24 +16,25 @@ class ERP5_scalability():
...
@@ -16,24 +16,25 @@ class ERP5_scalability():
return
'example/scalabilityUsers'
return
'example/scalabilityUsers'
def
getUserQuantity
(
self
,
test_number
):
def
getUserQuantity
(
self
,
test_number
):
return
[
20
,
30
,
40
,
50
,
75
][
test_number
]
return
[
20
,
30
,
40
,
50
,
60
][
test_number
]
# Test duration in seconds
# Test duration in seconds
def
getTestDuration
(
self
,
test_number
):
def
getTestDuration
(
self
,
test_number
):
return
40
*
self
.
getUserQuantity
(
test_number
)
return
8
*
self
.
getUserQuantity
(
test_number
)
def
getTestRepetition
(
self
,
test_number
):
def
getTestRepetition
(
self
,
test_number
):
return
3
return
3
def
getScalabilityTestUrl
(
self
,
instance_information_dict
):
def
getScalabilityTestUrl
(
self
,
instance_information_dict
):
erp5_address
=
instance_information_dict
[
"zope-address"
]
frontend_address
=
instance_information_dict
[
'frontend-url-list'
][
0
]
return
"
http://%s/erp5"
%
erp5
_address
return
"
%s/erp5"
%
frontend
_address
def
getScalabilityTestMetricUrl
(
self
,
instance_information_dict
,
**
kw
):
def
getScalabilityTestMetricUrl
(
self
,
instance_information_dict
,
**
kw
):
metrics_url
=
"http://%s:%s@%s/erp5"
%
(
instance_information_dict
[
'user'
],
frontend_address
=
instance_information_dict
[
'frontend-url-list'
][
0
]
instance_information_dict
[
'password'
],
metrics_url
=
frontend_address
.
replace
(
"https://"
,
instance_information_dict
[
'zope-address'
])
"https://%s:%s@"
%
(
instance_information_dict
[
'user'
],
return
metrics_url
+
"/ERP5Site_getScalabilityTestMetric"
instance_information_dict
[
'password'
]))
return
metrics_url
+
"/erp5/ERP5Site_getScalabilityTestMetric"
def
getScalabilityTestOutput
(
self
,
metric_list
):
def
getScalabilityTestOutput
(
self
,
metric_list
):
"""
"""
...
@@ -52,9 +53,10 @@ class ERP5_scalability():
...
@@ -52,9 +53,10 @@ class ERP5_scalability():
str
(
output_json
[
PERSON_KEY
]),
str
(
output_json
[
ORDER_KEY
]))
str
(
output_json
[
PERSON_KEY
]),
str
(
output_json
[
ORDER_KEY
]))
def
getBootstrapScalabilityTestUrl
(
self
,
instance_information_dict
,
count
=
0
,
**
kw
):
def
getBootstrapScalabilityTestUrl
(
self
,
instance_information_dict
,
count
=
0
,
**
kw
):
bootstrap_url
=
"http://%s:%s@%s/erp5"
%
(
instance_information_dict
[
'user'
],
frontend_address
=
instance_information_dict
[
'frontend-url-list'
][
0
]
instance_information_dict
[
'password'
],
bootstrap_url
=
frontend_address
.
replace
(
"https://"
,
instance_information_dict
[
'zope-address'
])
"https://%s:%s@"
%
(
instance_information_dict
[
'user'
],
bootstrap_url
+=
"/ERP5Site_bootstrapScalabilityTest"
instance_information_dict
[
'password'
]))
bootstrap_url
+=
"/erp5/ERP5Site_bootstrapScalabilityTest"
bootstrap_url
+=
"?user_quantity=%i"
%
self
.
getUserQuantity
(
count
)
bootstrap_url
+=
"?user_quantity=%i"
%
self
.
getUserQuantity
(
count
)
return
bootstrap_url
return
bootstrap_url
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