***
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
09d27cb0
Commit
09d27cb0
authored
1 year ago
by
android172
Browse files
Options
Downloads
Patches
Plain Diff
Added BVH build times to report.
parent
81dbafa1
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
assignment2/report.tex
+4
-4
4 additions, 4 deletions
assignment2/report.tex
assignment2/run_tests.py
+26
-10
26 additions, 10 deletions
assignment2/run_tests.py
with
30 additions
and
14 deletions
assignment2/report.tex
+
4
−
4
View file @
09d27cb0
...
...
@@ -228,10 +228,10 @@
\newpage
\section
{
Render Times
}
\begin{tabular}
{
l|c|c
}
%
\bfseries
Scene
&
\bfseries
Time
(sec)
&
\bfseries
Timeout (sec)
% specify table head
\csvreader
[no head]
{
times.csv
}{
1=
\one
,2=
\two
,3=
\three
}
% use head of csv as column names
{
\\\hline
\one
&
\two
&
\three
}
% specify your col
o
umns here
\begin{tabular}
{
l|c|c
|c
}
%
\bfseries
Scene
&
\bfseries
BVH Build (sec)
&
\bfseries
Render
(sec)
&
\bfseries
Timeout (sec)
% specify table head
\csvreader
[no head]
{
times.csv
}{
1=
\one
,2=
\two
,3=
\three
,4=
\four
}
% use head of csv as column names
{
\\\hline
\one
&
\two
&
\three
&
\four
}
% specify your columns here
\end{tabular}
\end{document}
This diff is collapsed.
Click to expand it.
assignment2/run_tests.py
+
26
−
10
View file @
09d27cb0
...
...
@@ -42,6 +42,19 @@ def find_build_directory():
return
os
.
path
.
join
(
root
,
"
../build
"
)
return
os
.
path
.
join
(
root
,
"
build
"
)
def
extract_times
(
text_log
):
import
regex
as
re
pattern_1
=
r
'
# benchmark # Building the acceleration structure took: (.*) s
'
pattern_2
=
r
'
# benchmark # Rendering took: (.*) s
'
match_1
=
re
.
search
(
pattern_1
,
text_log
)
match_2
=
re
.
search
(
pattern_2
,
text_log
)
build_time
=
match_1
.
group
(
1
)
if
match_1
else
"
-
"
render_time
=
match_2
.
group
(
1
)
if
match_2
else
"
-
"
return
build_time
,
render_time
def
test_warps_and_scenes
():
total
=
len
(
TEST_SCENES
)
+
len
(
TEST_WARPS
)
...
...
@@ -54,22 +67,25 @@ def test_warps_and_scenes():
for
t
,
to
,
skip
,
skip_to
in
RENDER_SCENES
:
if
(
skip
and
os
.
path
.
exists
(
skip
))
or
(
skip_to
and
os
.
path
.
exists
(
skip_to
)):
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
, skipped,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
,
-,
skipped,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
continue
path
=
t
try
:
start_time
=
time
.
time
()
ret
=
subprocess
.
call
([
os
.
path
.
join
(
build_dir
,
"
nori
"
),
path
,
"
--no-gui
"
],
timeout
=
to
)
end_time
=
time
.
time
()
elapsed_time
=
end_time
-
start_time
#elapsed_time_ms = elapsed_time * 1000
if
ret
==
0
:
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
,
"
+
str
(
round
(
elapsed_time
,
2
))
+
"
,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
ret
:
subprocess
.
CompletedProcess
=
subprocess
.
run
(
[
os
.
path
.
join
(
build_dir
,
"
nori
"
),
path
,
"
--no-gui
"
],
timeout
=
to
,
capture_output
=
True
,
text
=
True
)
if
ret
.
returncode
==
0
:
build_time
,
render_time
=
extract_times
(
ret
.
stdout
)
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
,
"
+
build_time
+
"
,
"
+
str
(
round
(
render_time
,
2
))
+
"
,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
else
:
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
, error,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
,
-,
error,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
except
subprocess
.
TimeoutExpired
:
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
, timeout,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
times_output
.
write
(
t
.
replace
(
"
_
"
,
"
\_
"
)
+
"
,
-,
timeout,
"
+
str
(
round
(
to
,
2
))
+
"
\n
"
)
with
open
(
"
to_
"
+
t
,
'
w
'
)
as
fp
:
pass
...
...
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