update udm
This commit is contained in:
committed by
Dana Van Aken
parent
f14f87c817
commit
906d528357
6
client/driver/fabfile.py
vendored
6
client/driver/fabfile.py
vendored
@@ -643,6 +643,9 @@ def loop(i):
|
||||
# remove oltpbench log and controller log
|
||||
clean_logs()
|
||||
|
||||
if dconf.ENABLE_UDM is True:
|
||||
clean_oltpbench_results()
|
||||
|
||||
# check disk usage
|
||||
if check_disk_usage() > dconf.MAX_DISK_USAGE:
|
||||
LOG.warning('Exceeds max disk usage %s', dconf.MAX_DISK_USAGE)
|
||||
@@ -676,7 +679,6 @@ def loop(i):
|
||||
# add user defined metrics
|
||||
if dconf.ENABLE_UDM is True:
|
||||
add_udm()
|
||||
clean_oltpbench_results()
|
||||
|
||||
# save result
|
||||
result_timestamp = save_dbms_result()
|
||||
@@ -722,8 +724,8 @@ def run_loops(max_iter=10):
|
||||
|
||||
# reload database periodically
|
||||
if dconf.RELOAD_INTERVAL > 0:
|
||||
time.sleep(15)
|
||||
if i % dconf.RELOAD_INTERVAL == 0:
|
||||
is_ready_db(interval_sec=10)
|
||||
if i == 0 and dump is False:
|
||||
restore_database()
|
||||
elif i > 0:
|
||||
|
||||
@@ -12,27 +12,21 @@ parser = argparse.ArgumentParser() # pylint: disable=invalid-name
|
||||
parser.add_argument("result_dir")
|
||||
args = parser.parse_args() # pylint: disable=invalid-name
|
||||
|
||||
HAS_TARGET_OBJECTIVE = True
|
||||
USER_DEINFED_METRICS = {
|
||||
"target_objective": {
|
||||
"throughput": {
|
||||
"more_is_better": True,
|
||||
"unit": "transaction / second",
|
||||
"short_unit": "txn/s",
|
||||
"type": VarType.INTEGER
|
||||
}
|
||||
"throughput": {
|
||||
"unit": "transaction / second",
|
||||
"short_unit": "txn/s",
|
||||
"type": VarType.INTEGER
|
||||
},
|
||||
"metrics": {
|
||||
"latency_99": {
|
||||
"unit": "microseconds",
|
||||
"short_unit": "us",
|
||||
"type": VarType.INTEGER
|
||||
},
|
||||
"latency_95": {
|
||||
"unit": "microseconds",
|
||||
"short_unit": "us",
|
||||
"type": VarType.INTEGER
|
||||
}
|
||||
"latency_99": {
|
||||
"unit": "microseconds",
|
||||
"short_unit": "us",
|
||||
"type": VarType.INTEGER
|
||||
},
|
||||
"latency_95": {
|
||||
"unit": "microseconds",
|
||||
"short_unit": "us",
|
||||
"type": VarType.INTEGER
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,16 +36,10 @@ def get_udm():
|
||||
with open(summary_path, 'r') as f:
|
||||
info = json.load(f)
|
||||
metrics = copy.deepcopy(USER_DEINFED_METRICS)
|
||||
if HAS_TARGET_OBJECTIVE is False:
|
||||
metrics["target_objective"] = None
|
||||
else:
|
||||
assert len(metrics["target_objective"]) == 1, "It should have only one target objective"
|
||||
metrics["target_objective"]["throughput"]["value"] =\
|
||||
info["Throughput (requests/second)"]
|
||||
|
||||
metrics["metrics"]["latency_99"]["value"] =\
|
||||
metrics["throughput"]["value"] = info["Throughput (requests/second)"]
|
||||
metrics["latency_99"]["value"] =\
|
||||
info["Latency Distribution"]["99th Percentile Latency (microseconds)"]
|
||||
metrics["metrics"]["latency_95"]["value"] =\
|
||||
metrics["latency_95"]["value"] =\
|
||||
info["Latency Distribution"]["95th Percentile Latency (microseconds)"]
|
||||
return metrics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user