Skip to content
Snippets Groups Projects
Commit 72f5d469 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 e99256ef
No related branches found
No related tags found
No related merge requests found
...@@ -282,8 +282,14 @@ def run_evaluation(exp_id, uc_id, dim_value, instances, execution_minutes, prome ...@@ -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. :param int execution_minutes: How long the use case where executed.
""" """
print('Run evaluation function') print('Run evaluation function')
lag_analysis.main(exp_id, f'uc{uc_id}', dim_value, instances, try:
execution_minutes, prometheus_base_url, result_path) 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 return
......
import lib.trend_slope_computer as trend_slope_computer
import logging
import os import os
import sys import sys
import os
import lib.trend_slope_computer as trend_slope_computer
THRESHOLD = 2000 THRESHOLD = 2000
WARMUP_SEC = 60 WARMUP_SEC = 60
...@@ -10,7 +10,13 @@ def execute(config): ...@@ -10,7 +10,13 @@ def execute(config):
cwd = f'{os.getcwd()}/{config.result_path}' cwd = f'{os.getcwd()}/{config.result_path}'
file = f"exp{config.exp_id}_uc{config.use_case}_{config.dim_value}_{config.replicas}_totallag.csv" 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}") print(f"Trend Slope: {trend_slope}")
success = 0 if trend_slope > THRESHOLD else 1 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