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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
9d433480
Commit
9d433480
authored
Dec 07, 2017
by
Roque Porchetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scalability_test: adding createSaleOrder testsuite and metrics
parent
f6786bbb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
scalability_test/__init__.py
scalability_test/__init__.py
+13
-4
No files found.
scalability_test/__init__.py
View file @
9d433480
import
os.path
import
json
PERSON_KEY
=
"person_per_hour"
ORDER_KEY
=
"sale_order_per_hour"
class
ERP5_scalability
():
def
getTestList
(
self
):
return
[
'createPerson'
]
return
[
'createPerson'
,
'createSaleOrder'
]
def
getTestPath
(
self
):
return
'example/'
...
...
@@ -33,14 +36,20 @@ class ERP5_scalability():
return
metrics_url
+
"/ERP5Site_getScalabilityTestMetric"
def
getScalabilityTestOutput
(
self
,
metric_list
):
"""
From the list of metrics taken during a test run, select the best metric
for the test output by a specific criteria
"""
if
not
metric_list
:
return
None
output_json
=
json
.
loads
(
metric_list
[
0
])
for
metric
in
metric_list
:
metric_json
=
json
.
loads
(
metric
)
if
metric_json
[
"person_per_hour"
]
>
output_json
[
"person_per_hour"
]:
output_json
=
metric_json
if
metric_json
[
PERSON_KEY
]
>
output_json
[
PERSON_KEY
]:
output_json
[
PERSON_KEY
]
=
metric_json
[
PERSON_KEY
]
if
metric_json
[
ORDER_KEY
]
>
output_json
[
ORDER_KEY
]:
output_json
[
ORDER_KEY
]
=
metric_json
[
ORDER_KEY
]
return
"Person: %s doc/hour; SaleOrder: %s doc/hour;"
%
(
str
(
output_json
[
"person_per_hour"
]),
str
(
output_json
[
"sale_order_per_hour"
]))
str
(
output_json
[
PERSON_KEY
]),
str
(
output_json
[
ORDER_KEY
]))
def
getBootstrapScalabilityTestUrl
(
self
,
instance_information_dict
,
count
=
0
,
**
kw
):
bootstrap_url
=
"http://%s:%s@%s/erp5"
%
(
instance_information_dict
[
'user'
],
...
...
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