Commit 4db5b8e0 authored by Roque Porchetto's avatar Roque Porchetto

scalability_test: converting metrics to json

parent de645707
import os.path
import json
class WendelinERP5_scalability():
......@@ -32,14 +33,15 @@ class WendelinERP5_scalability():
instance_information_dict['zope-address'])
return metrics_url + "/ERP5Site_getScalabilityTestMetric"
def getScalabilityTestOutput(self, metric_list):
def getScalabilityTestOutput(metric_list):
if not metric_list: return None
output_dict = metric_list[0]
for metric_dict in metric_list:
if metric_dict["person_per_hour"] > output_dict["person_per_hour"]:
output_dict = metric_dict
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
return "Person: %s doc/hour; SaleOrder: %s doc/hour;" % (
str(output_dict["person_per_hour"]), str(output_dict["sale_order_per_hour"]))
str(output_json["person_per_hour"]), str(output_json["sale_order_per_hour"]))
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