*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 77091ce7 authored by android172's avatar android172
Browse files

Build times will be extracted on timeout too.

parent a6fb2dde
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,7 @@ def find_build_directory():
return os.path.join(root, "../build")
return os.path.join(root, "build")
def extract_times(text_log):
def extract_times(text_log, value_for_failure):
import re
pattern_1 = r'# benchmark # Building the acceleration structure took: (.*) s'
......@@ -54,7 +54,10 @@ def extract_times(text_log):
build_time = float(match_1.group(1)) if match_1 else -1
render_time = float(match_2.group(1)) if match_2 else -1
return build_time, render_time
build_time_s = str(round(build_time, 4)) if build_time != -1 else value_for_failure
render_time_s = str(round(render_time, 2)) if render_time != -1 else value_for_failure
return build_time_s, render_time_s
def test_warps_and_scenes():
total = len(TEST_SCENES) + len(TEST_WARPS)
......@@ -79,18 +82,20 @@ def test_warps_and_scenes():
text=True
)
if ret.returncode == 0:
build_time, render_time = extract_times(ret.stdout)
bt_s = str(round(build_time, 4)) if build_time != -1 else "-"
rt_s = str(round(render_time, 2)) if render_time != -1 else "-"
to_s = str(round(to, 2))
times_output.write(t.replace("_", "\_") + ", " + bt_s + ", " + rt_s + ", " + to_s + "\n")
else:
times_output.write(t.replace("_", "\_") + ", error, error, " + str(round(to, 2)) + "\n")
bt_s, rt_s = extract_times(
ret.stdout,
"-" if ret.returncode == 0 else "error"
)
except subprocess.TimeoutExpired:
times_output.write(t.replace("_", "\_") + ", -, timeout, " + str(round(to, 2)) + "\n")
bt_s, rt_s = extract_times(
ret.stdout,
"timeout"
)
with open("to_" + t, 'w') as fp:
pass
to_s = str(round(to, 2))
times_output.write(t.replace("_", "\_") + ", " + bt_s + ", " + rt_s + ", " + to_s + "\n")
for t in TEST_SCENES:
path = t
......
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