Skip to content
Snippets Groups Projects
Commit 8bbb60f6 authored by Sören Henning's avatar Sören Henning
Browse files

Enhance logging

parent 4c70e44c
No related branches found
No related tags found
3 merge requests!159Re-implementation of Theodolite with Kotlin/Quarkus,!157Update Graal Image in CI pipeline,!83WIP: Re-implementation of Theodolite with Kotlin/Quarkus
...@@ -18,7 +18,7 @@ if os.getenv('LOG_LEVEL') == 'INFO': ...@@ -18,7 +18,7 @@ if os.getenv('LOG_LEVEL') == 'INFO':
elif os.getenv('LOG_LEVEL') == 'WARNING': elif os.getenv('LOG_LEVEL') == 'WARNING':
logger.setLevel(logging.WARNING) logger.setLevel(logging.WARNING)
elif os.getenv('LOG_LEVEL') == 'DEBUG': elif os.getenv('LOG_LEVEL') == 'DEBUG':
logger.setLevel((logging.DEBUG)) logger.setLevel(logging.DEBUG)
def execute(results, threshold, warmup): def execute(results, threshold, warmup):
d = [] d = []
...@@ -34,14 +34,14 @@ def execute(results, threshold, warmup): ...@@ -34,14 +34,14 @@ def execute(results, threshold, warmup):
try: try:
trend_slope = trend_slope_computer.compute(df, warmup) trend_slope = trend_slope_computer.compute(df, warmup)
except Exception as e: except Exception as e:
err_msg = 'Computing trend slope failed' err_msg = 'Computing trend slope failed.'
logger.exception(err_msg) logger.exception(err_msg)
logger.error('Mark this subexperiment as not successful and continue benchmark') logger.error('Mark this subexperiment as not successful and continue benchmark.')
return False return False
logger.info("Trend Slope: %s", trend_slope) result = trend_slope < threshold
logger.info("Computed lag trend slope is '%s'. Result is: %s", trend_slope, result)
return trend_slope < threshold return result
@app.post("/evaluate-slope",response_model=bool) @app.post("/evaluate-slope",response_model=bool)
async def evaluate_slope(request: Request): async def evaluate_slope(request: Request):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment