***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rendering Data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
E193-02 Rendering Course
Rendering Data
Commits
77091ce7
Commit
77091ce7
authored
1 year ago
by
android172
Browse files
Options
Downloads
Patches
Plain Diff
Build times will be extracted on timeout too.
parent
a6fb2dde
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
assignment2/run_tests.py
+16
-11
16 additions, 11 deletions
assignment2/run_tests.py
with
16 additions
and
11 deletions
assignment2/run_tests.py
+
16
−
11
View file @
77091ce7
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment