Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
compare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fcfc7f70
authored
Jul 19, 2019
by
Sebastian Renner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for splitting data into multiple plots
parent
32c851e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
parse_logic.py
+22
-7
No files found.
parse_logic.py
View file @
fcfc7f70
...
@@ -68,12 +68,26 @@ def read_log(d):
...
@@ -68,12 +68,26 @@ def read_log(d):
return
(
algorithm
,
dicts
)
return
(
algorithm
,
dicts
)
def
gen_graph_chunks
(
bp_data
,
bp_labels
,
size
):
l
=
len
(
bp_data
)
for
i
in
range
(
0
,
(
l
//
size
)
*
size
,
size
):
chunk
=
bp_data
[
i
:
i
+
size
]
labels
=
bp_labels
[
i
:
i
+
size
]
plt
.
boxplot
(
chunk
,
labels
=
labels
)
plt
.
xticks
(
rotation
=
90
)
plt
.
show
()
# Let's also plot the leftover
rest
=
l
%
size
if
rest
!=
0
:
plt
.
boxplot
(
bp_data
[(
rest
-
2
*
rest
):])
plt
.
show
()
def
main
():
def
main
():
print
(
'THE LWC BENCHMARK SPLITTER'
)
print
(
'THE LWC BENCHMARK SPLITTER'
)
print
(
'powered by Deutsche Bahn'
)
print
(
'powered by Deutsche Bahn'
)
build_dir
=
'build/new/'
build_dir
=
'build/new/'
b
ox_plot
_data
=
[]
b
p
_data
=
[]
b
ox_plot
_labels
=
[]
b
p
_labels
=
[]
for
d
in
os
.
listdir
(
build_dir
):
for
d
in
os
.
listdir
(
build_dir
):
#dicts[0] --> algo
#dicts[0] --> algo
#dicts[1][0] --> enc
#dicts[1][0] --> enc
...
@@ -82,8 +96,8 @@ def main():
...
@@ -82,8 +96,8 @@ def main():
enc_values
=
dicts
[
1
][
0
]
.
values
()
enc_values
=
dicts
[
1
][
0
]
.
values
()
dec_values
=
dicts
[
1
][
1
]
.
values
()
dec_values
=
dicts
[
1
][
1
]
.
values
()
b
ox_plot
_data
.
append
(
list
(
enc_values
))
b
p
_data
.
append
(
list
(
enc_values
))
b
ox_plot
_labels
.
append
(
dicts
[
0
])
b
p
_labels
.
append
(
dicts
[
0
])
print
(
"Average enc time[s] =
%
f"
%
(
statistics
.
mean
(
enc_values
)))
print
(
"Average enc time[s] =
%
f"
%
(
statistics
.
mean
(
enc_values
)))
print
(
"Median enc time[s] =
%
f"
%
(
statistics
.
median
(
enc_values
)))
print
(
"Median enc time[s] =
%
f"
%
(
statistics
.
median
(
enc_values
)))
...
@@ -100,9 +114,10 @@ def main():
...
@@ -100,9 +114,10 @@ def main():
if
dec_len
!=
1089
or
enc_len
!=
1089
:
if
dec_len
!=
1089
or
enc_len
!=
1089
:
raise
Exception
(
"#Number of encrypted test vectors (
%
d)/ decrypted test vectors (
%
d) does not match guidelines (1089)"
%
(
enc_len
,
dec_len
))
raise
Exception
(
"#Number of encrypted test vectors (
%
d)/ decrypted test vectors (
%
d) does not match guidelines (1089)"
%
(
enc_len
,
dec_len
))
plt
.
boxplot
(
box_plot_data
,
labels
=
box_plot_labels
)
gen_graph_chunks
(
bp_data
,
bp_labels
,
5
)
plt
.
xticks
(
rotation
=
90
)
#plt.boxplot(bp_data, labels=bp_labels)
plt
.
show
()
#plt.xticks(rotation=90)
#plt.show()
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
()
main
()
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