support user defined metrics

This commit is contained in:
bohanjason
2020-04-28 00:21:04 -04:00
committed by Dana Van Aken
parent 346a2470b5
commit 6c436e66c0
3 changed files with 12 additions and 4 deletions

View File

@@ -4,8 +4,9 @@ import copy
import argparse
import os
sys.path.append("../../../")
sys.path.append("../")
from server.website.website.types import VarType # pylint: disable=import-error,wrong-import-position,line-too-long # noqa: E402
from driver_config import OLTPBENCH_HOME # pylint: disable=import-error,wrong-import-position # noqa: E402
parser = argparse.ArgumentParser() # pylint: disable=invalid-name
parser.add_argument("result_dir")
@@ -37,7 +38,8 @@ USER_DEINFED_METRICS = {
def get_udm():
with open('../oltpbench.summary', 'r') as f:
summary_path = OLTPBENCH_HOME + '/results/outputfile.summary'
with open(summary_path, 'r') as f:
info = json.load(f)
metrics = copy.deepcopy(USER_DEINFED_METRICS)
if HAS_TARGET_OBJECTIVE is False: