Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
predictable_parallel_patterns
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
76f1622e
authored
Apr 08, 2019
by
FritzFlorian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add very simple tool to compare performance impact of current changes
parent
f0f3b80e
Pipeline
#1139
passed with stages
in 3 minutes 28 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
7 deletions
+46
-7
README.md
+0
-5
app/benchmark_fft/main.cpp
+1
-1
compare_benchmarks.py
+44
-0
lib/pls/include/pls/internal/helpers/mini_benchmark.h
+1
-1
No files found.
README.md
View file @
76f1622e
...
@@ -42,11 +42,6 @@ Available Settings:
...
@@ -42,11 +42,6 @@ Available Settings:
-
Only one sanitizer can be active at once
-
Only one sanitizer can be active at once
-
Enabling has a performance hit (do not use in releases)
-
Enabling has a performance hit (do not use in releases)
commit | fft(1) | fft(2)
--- | --- | ---
[
d2eff7da
](
https://lab.las3.de/gitlab/las3/development/scheduling/predictable_parallel_patterns/commit/d2eff7dafcd822a4da662c2b4606d504b8545483
)
| 12.5ms
<span
style=
"color:green"
>
-5.3%
</span>
| 6.5ms
<span
style=
"color:green"
>
-5.3%
</span>
### Testing
### Testing
Testing is done using
[
Catch2
](
https://github.com/catchorg/Catch2/
)
Testing is done using
[
Catch2
](
https://github.com/catchorg/Catch2/
)
...
...
app/benchmark_fft/main.cpp
View file @
76f1622e
...
@@ -81,7 +81,7 @@ int main() {
...
@@ -81,7 +81,7 @@ int main() {
pls
::
internal
::
helpers
::
run_mini_benchmark
([
&
]
{
pls
::
internal
::
helpers
::
run_mini_benchmark
([
&
]
{
complex_vector
input
=
initial_input
;
complex_vector
input
=
initial_input
;
fft
(
input
.
begin
(),
input
.
size
());
fft
(
input
.
begin
(),
input
.
size
());
},
8
);
},
8
,
4000
);
PROFILE_SAVE
(
"test_profile.prof"
)
PROFILE_SAVE
(
"test_profile.prof"
)
}
}
compare_benchmarks.py
0 → 100755
View file @
76f1622e
#!bin/python3
import
sys
import
os
if
len
(
sys
.
argv
)
<
2
:
print
(
"Please pass the name of the benchmark target as an argument!"
)
exit
(
1
)
target
=
sys
.
argv
[
1
]
print
(
'Comparing current modifications for benchmark target '
+
target
)
print
(
'Executing current version...'
)
print
(
os
.
popen
(
'cd cmake-build-release; make '
+
target
)
.
read
())
current
=
os
.
popen
(
'chrt -rr 99 ./cmake-build-release/bin/'
+
target
)
.
read
()
print
(
'Executing old version...'
)
print
(
os
.
popen
(
'git stash push'
)
.
read
())
print
(
os
.
popen
(
'cd cmake-build-release; make '
+
target
)
.
read
())
before
=
os
.
popen
(
'chrt -rr 99 ./cmake-build-release/bin/'
+
target
)
.
read
()
print
(
os
.
popen
(
'git stash pop'
)
.
read
())
print
(
'======================================================='
)
current
=
[
float
(
value
)
for
value
in
current
.
split
(
','
)]
before
=
[
float
(
value
)
for
value
in
before
.
split
(
','
)]
def
formate_change
(
change
):
if
change
>
1.05
:
color
=
'31'
elif
change
<
0.95
:
color
=
'32'
else
:
color
=
'30'
return
'
\033
[1;'
+
color
+
';40m
%8.2
f'
%
(
change
*
100
)
+
'
%
'
format_string
=
' '
.
join
([
'
%10.2
f us'
]
*
len
(
current
))
print
(
'old: '
+
format_string
%
tuple
(
before
))
print
(
'new: '
+
format_string
%
tuple
(
current
))
print
(
'='
*
55
)
change
=
[
c
/
b
for
b
,
c
in
zip
(
before
,
current
)]
formated_change
=
''
.
join
(
list
(
map
(
formate_change
,
change
)))
print
(
formated_change
)
lib/pls/include/pls/internal/helpers/mini_benchmark.h
View file @
76f1622e
...
@@ -41,7 +41,7 @@ namespace pls {
...
@@ -41,7 +41,7 @@ namespace pls {
std
::
cout
<<
time_per_iteration
;
std
::
cout
<<
time_per_iteration
;
if
(
num_threads
<
max_threads
)
{
if
(
num_threads
<
max_threads
)
{
std
::
cout
<<
",
"
;
std
::
cout
<<
","
;
}
}
}
}
std
::
cout
<<
std
::
endl
;
std
::
cout
<<
std
::
endl
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment