Skip to content
Snippets Groups Projects
Commit de79021e authored by Björn Vonheiden's avatar Björn Vonheiden Committed by Sören Henning
Browse files

Continue benchmark in case of analysis failure.

The lag analysis and trend slope computer may fail to various reasons.
But the benchmark should continoue, because this may be only temporary errors.
parent 498efd05
No related branches found
No related tags found
1 merge request!73Continue benchmark in case of analysis failure.
......@@ -282,8 +282,14 @@ def run_evaluation(exp_id, uc_id, dim_value, instances, execution_minutes, prome
:param int execution_minutes: How long the use case where executed.
"""
print('Run evaluation function')
lag_analysis.main(exp_id, f'uc{uc_id}', dim_value, instances,
execution_minutes, prometheus_base_url, result_path)
try:
lag_analysis.main(exp_id, f'uc{uc_id}', dim_value, instances,
execution_minutes, prometheus_base_url,
result_path)
except Exception as e:
print('Evaluation function failed')
logging.exception('Evaluation function failed')
return
......
import lib.trend_slope_computer as trend_slope_computer
import logging
import os
import sys
import os
import lib.trend_slope_computer as trend_slope_computer
THRESHOLD = 2000
WARMUP_SEC = 60
......@@ -10,7 +10,13 @@ def execute(config):
cwd = f'{os.getcwd()}/{config.result_path}'
file = f"exp{config.exp_id}_uc{config.use_case}_{config.dim_value}_{config.replicas}_totallag.csv"
trend_slope = trend_slope_computer.compute(cwd, file, WARMUP_SEC, THRESHOLD)
try:
trend_slope = trend_slope_computer.compute(cwd, file, WARMUP_SEC, THRESHOLD)
except Exception as e:
print('Computing trend slope failed.')
logging.exception('Computing trend slope failed.')
return 0
print(f"Trend Slope: {trend_slope}")
success = 0 if trend_slope > THRESHOLD else 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment