Commit 9d433480 authored by Roque Porchetto's avatar Roque Porchetto

scalability_test: adding createSaleOrder testsuite and metrics

parent f6786bbb
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'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment