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
Labels
Merge Requests
140
Merge Requests
140
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
badff5fa
Commit
badff5fa
authored
Feb 27, 2018
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability: test suite refactor and new site availability url
parent
9af9a3c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
22 deletions
+20
-22
scalability_test/__init__.py
scalability_test/__init__.py
+20
-22
No files found.
scalability_test/__init__.py
View file @
badff5fa
...
@@ -21,9 +21,8 @@ class ERP5_scalability():
...
@@ -21,9 +21,8 @@ class ERP5_scalability():
def
getUserQuantity
(
self
,
test_number
):
def
getUserQuantity
(
self
,
test_number
):
return
[
8
,
14
,
20
,
28
,
36
][
test_number
]
return
[
8
,
14
,
20
,
28
,
36
][
test_number
]
# Test duration in seconds
def
getTestDuration
(
self
,
test_number
):
def
getTestDuration
(
self
,
test_number
):
return
30
*
self
.
getUserQuantity
(
test_number
)
return
60
*
10
def
getTestRepetition
(
self
,
test_number
):
def
getTestRepetition
(
self
,
test_number
):
return
3
return
3
...
@@ -37,16 +36,27 @@ class ERP5_scalability():
...
@@ -37,16 +36,27 @@ class ERP5_scalability():
return
"%s:%d/erp5"
%
(
frontend_address
,
port
)
return
"%s:%d/erp5"
%
(
frontend_address
,
port
)
def
getScalabilityTestMetricUrl
(
self
,
instance_information_dict
,
**
kw
):
def
getScalabilityTestMetricUrl
(
self
,
instance_information_dict
,
**
kw
):
for
frontend
in
instance_information_dict
[
'frontend-url-list'
]:
frontend_address
=
self
.
getScalabilityTestUrl
(
instance_information_dict
)
if
frontend
[
0
]
==
ZOPE_USER_FAMILY
:
frontend_address
=
frontend
[
1
]
break
port
=
4443
if
urlparse
.
urlparse
(
frontend_address
).
scheme
==
'https'
else
8080
frontend_address
=
"%s:%d"
%
(
frontend_address
,
port
)
metrics_url
=
frontend_address
.
replace
(
"://"
,
metrics_url
=
frontend_address
.
replace
(
"://"
,
"://%s:%s@"
%
(
instance_information_dict
[
'user'
],
"://%s:%s@"
%
(
instance_information_dict
[
'user'
],
instance_information_dict
[
'password'
]))
instance_information_dict
[
'password'
]))
return
metrics_url
+
"/erp5/ERP5Site_getScalabilityTestMetric"
return
metrics_url
+
"/ERP5Site_getScalabilityTestMetric"
def
getBootstrapScalabilityTestUrl
(
self
,
instance_information_dict
,
count
=
0
,
**
kw
):
frontend_address
=
self
.
getScalabilityTestUrl
(
instance_information_dict
)
bootstrap_url
=
frontend_address
.
replace
(
"://"
,
"://%s:%s@"
%
(
instance_information_dict
[
'user'
],
instance_information_dict
[
'password'
]))
bootstrap_url
+=
"/ERP5Site_bootstrapScalabilityTest"
bootstrap_url
+=
"?user_quantity=%i"
%
self
.
getUserQuantity
(
count
)
return
bootstrap_url
def
getSiteAvailabilityUrl
(
self
,
instance_information_dict
,
**
kw
):
frontend_address
=
self
.
getScalabilityTestUrl
(
instance_information_dict
)
site_url
=
frontend_address
.
replace
(
"://"
,
"://%s:%s@"
%
(
instance_information_dict
[
'user'
],
instance_information_dict
[
'password'
]))
return
site_url
+
"/ERP5Site_isReady"
def
getScalabilityTestOutput
(
self
,
metric_list
):
def
getScalabilityTestOutput
(
self
,
metric_list
):
"""
"""
...
@@ -63,15 +73,3 @@ class ERP5_scalability():
...
@@ -63,15 +73,3 @@ class ERP5_scalability():
output_json
[
ORDER_KEY
]
=
metric_json
[
ORDER_KEY
]
output_json
[
ORDER_KEY
]
=
metric_json
[
ORDER_KEY
]
return
"Person: %s doc/hour; SaleOrder: %s doc/hour;"
%
(
return
"Person: %s doc/hour; SaleOrder: %s doc/hour;"
%
(
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
):
for
zope
in
instance_information_dict
[
'zope-address-list'
]:
if
zope
[
0
]
==
ZOPE_USER_FAMILY
:
zope_address
=
zope
[
1
]
break
bootstrap_url
=
"http://%s:%s@%s"
%
(
instance_information_dict
[
'user'
],
instance_information_dict
[
'password'
],
zope_address
)
bootstrap_url
+=
"/erp5/ERP5Site_bootstrapScalabilityTest"
bootstrap_url
+=
"?user_quantity=%i"
%
self
.
getUserQuantity
(
count
)
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