Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
emper-io-latency-eval
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lehrstuhl für Informatik 4 (Systemsoftware)
manycore
emper-io-latency-eval
Commits
aba782a1
Commit
aba782a1
authored
Apr 8, 2022
by
Florian Fischer
Browse files
Options
Downloads
Patches
Plain Diff
update plots
parent
163994bb
No related branches found
No related tags found
No related merge requests found
Pipeline
#80055
failed
Apr 8, 2022
Stage: check
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
gen_boxplots.py
+85
-6
85 additions, 6 deletions
gen_boxplots.py
muhq-ma-plots.sh
+16
-7
16 additions, 7 deletions
muhq-ma-plots.sh
plots/common.tex
+7
-0
7 additions, 0 deletions
plots/common.tex
with
108 additions
and
13 deletions
gen_boxplots.py
+
85
−
6
View file @
aba782a1
#!/usr/bin/env python3
"""
generate boxplots from descriptive stats in yaml
"""
import
os
import
sys
import
typing
as
T
...
...
@@ -8,6 +9,72 @@ import yaml
Data
=
dict
[
str
,
T
.
Any
]
PLOT_SPECIFICS
=
{
'
hints
'
:
{
'
ylabel
'
:
'
{latency [us]}
'
,
'
ymax
'
:
'
300
'
,
'
xmax
'
:
'
3
'
,
'
xtick
'
:
'
{1,2}
'
,
'
xticklabels
'
:
'
{pipe, pipe-no-hints}
'
,
'
title
'
:
'
Wakeup Hints
'
,
},
'
latency
'
:
{
'
ymax
'
:
'
1500
'
,
'
xtick
'
:
'
{1,2,3}
'
,
'
xticklabels
'
:
'
{pipe-steal-nc, pipe, pipe-nc}
'
,
'
title
'
:
'
Pipe Latency Variants
'
},
'
contention
'
:
{
'
ymax
'
:
'
1100
'
,
'
xtick
'
:
'
{1,2,3}
'
,
'
xticklabels
'
:
'
{no-sleep, vanilla}
'
,
'
title
'
:
'
Global queue contention
'
},
'
l-vs-ll
'
:
{
'
ymax
'
:
'
1500
'
,
'
xtick
'
:
'
{1,2,3,4}
'
,
'
xticklabels
'
:
'
{ll-n-nc, n-nc
\\
vertPhantom{}, ll-s-nc, s-nc
\\
vertPhantom{}}
'
,
'
title
'
:
'
Lockless vs Locked
'
},
'
n-s-c
'
:
{
'
ylabel
'
:
'
{latency [us]}
'
,
'
ymax
'
:
'
1300
'
,
'
xtick
'
:
'
{1,2,3,4}
'
,
'
xticklabels
'
:
'
{n, n-nc, s, s-nc}
'
,
'
title
'
:
'
Additional Completer
'
},
'
n-vs-ns
'
:
{
'
ylabel
'
:
'
{latency [us]}
'
,
'
ymax
'
:
'
150
'
,
'
xtick
'
:
'
{1,2,3}
'
,
'
xticklabels
'
:
'
{ll-n-nc, s-ns, ll-s-ns}
'
,
'
title
'
:
'
Notifications vs No Sleep
'
},
'
strategies
'
:
{
'
ymax
'
:
'
250
'
,
'
xtick
'
:
'
{1,2,3}
'
,
'
xticklabels
'
:
'
{vanilla, pipe,
\\
waitfd{}}
'
,
'
title
'
:
'
Sleep Strategies
'
},
}
def
generate_plot_specifics
()
->
str
:
"""
Generate plot specifics for the plot passed via the environment
"""
plot
=
os
.
environ
[
'
BOXPLOT
'
]
if
not
plot
:
return
''
if
plot
not
in
PLOT_SPECIFICS
:
print
(
f
'
ERROR: specified plot
"
{
plot
}
"
unknown
'
,
file
=
sys
.
stderr
)
sys
.
exit
(
1
)
tikz_lines
=
[]
for
key
,
value
in
PLOT_SPECIFICS
[
plot
].
items
():
tikz_lines
.
append
(
f
'
{
key
}
=
{
value
}
'
)
return
'
,
\n
'
.
join
(
tikz_lines
)
def
parse_data
(
stream
)
->
T
.
Optional
[
Data
]:
"""
Convert yamls string to dict
"""
...
...
@@ -15,22 +82,27 @@ def parse_data(stream) -> T.Optional[Data]:
TIKZ_TEMPLATE
=
\
"""
\\
documentclass[]{standalone}
\\
usepackage{pgfplots}
\\
pgfplotsset{compat=1.17}
\\
usepgfplotslibrary{statistics}
\\
input{common.tex}
\\
begin{document}
\\
begin{tikzpicture}
\\
begin{axis}[
mark=x,
boxplot/draw direction=y,
legend columns=2,
area legend,
ylabel=
"
latency [us]
"
,
xmin=0,
xtick pos=bottom,
ytick pos=left,
xminorticks=false,
yminorticks=false,
ymajorgrids=true,
legend style={
draw=none,
fill=none,
at={(0.5,-0.1)},
anchor=north
},
$PLOT_SPECIFICS$
]
$PLOTS$
\\
end{axis}
...
...
@@ -40,6 +112,7 @@ $PLOTS$
PLOT_TEMPLATE
=
\
"""
\\
addplot+[
mark=x,
boxplot prepared={{
lower whisker={lower_whisker},
lower quartile={lower_quartile},
...
...
@@ -49,13 +122,15 @@ PLOT_TEMPLATE = \
upper whisker={upper_whisker},
}},
] coordinates{{{outlier_cords}}};
\\
addlegendentry{{{variant}}}
%
\\
addlegendentry{{{variant}}}
"""
def
generate_boxplot
(
data
:
Data
)
->
str
:
"""
generate a tikzboxplot
"""
plots
=
''
for
variant
,
stats
in
data
.
items
():
outlier_cords
=
''
for
outlier
in
stats
[
'
outliers
'
]:
...
...
@@ -64,7 +139,11 @@ def generate_boxplot(data: Data) -> str:
outlier_cords
=
outlier_cords
,
**
stats
)
return
TIKZ_TEMPLATE
.
replace
(
'
$PLOTS$
'
,
plots
)
tikz
=
TIKZ_TEMPLATE
.
replace
(
'
$PLOTS$
'
,
plots
)
plot_specifics
=
generate_plot_specifics
()
tikz
=
tikz
.
replace
(
'
$PLOT_SPECIFICS$
'
,
plot_specifics
)
return
tikz
def
main
():
...
...
This diff is collapsed.
Click to expand it.
muhq-ma-plots.sh
+
16
−
7
View file @
aba782a1
...
...
@@ -6,6 +6,7 @@ SUM=./summarize.py
PLOT
=
./gen_boxplots.py
PLOT_DIR
=
plots/
PLOT_PREFIX
=
iol
RESULTS
=
$1
shift
...
...
@@ -15,20 +16,28 @@ if [[ -z "${RESULTS}" ]]; then
exit
1
fi
${
SUM
}
--yaml
-i
emper-pipe emper-pipe-no-hint
--
"
${
RESULTS
}
"
|
${
PLOT
}
>
${
PLOT_DIR
}
/io-latency-hints.tex
${
SUM
}
--yaml
-i
emper-pipe emper-pipe-no-hint
--
"
${
RESULTS
}
"
\
|
BOXPLOT
=
"hints"
${
PLOT
}
>
${
PLOT_DIR
}
/
${
PLOT_PREFIX
}
-hints
.tex
${
SUM
}
--yaml
-i
emper-pipe emper-pipe-no-comp emper-io-stealing-pipe-no-comp
--
"
${
RESULTS
}
"
\
|
${
PLOT
}
>
${
PLOT_DIR
}
/
io
-latency.tex
|
BOXPLOT
=
"latency"
${
PLOT
}
>
${
PLOT_DIR
}
/
${
PLOT_PREFIX
}
-latency
.tex
${
SUM
}
--yaml
-i
emper-pipe emper-waitfd
--
"
${
RESULTS
}
"
|
${
PLOT
}
>
${
PLOT_DIR
}
/pipe-vs-waitfd.tex
${
SUM
}
--yaml
-i
emper-vanilla emper-no-sleep
--
"
${
RESULTS
}
"
\
|
BOXPLOT
=
"contention"
${
PLOT
}
>
${
PLOT_DIR
}
/
${
PLOT_PREFIX
}
-contention
.tex
${
SUM
}
--yaml
-i
emper-vanilla emper-pipe emper-waitfd
--
"
${
RESULTS
}
"
\
|
BOXPLOT
=
"strategies"
${
PLOT
}
>
${
PLOT_DIR
}
/
${
PLOT_PREFIX
}
-strategies
.tex
${
SUM
}
--yaml
-i
emper-io-notification-waitfd-no-comp emper-io-notification-waitfd
\
emper-io-stealing-waitfd-no-comp emper-io-stealing-waitfd
--
"
${
RESULTS
}
"
\
|
${
PLOT
}
>
${
PLOT_DIR
}
/notification-stealing-completer.tex
|
BOXPLOT
=
"n-s-c"
${
PLOT
}
>
${
PLOT_DIR
}
/
${
PLOT_PREFIX
}
-
notification-stealing-completer
.tex
${
SUM
}
--yaml
-i
emper-io-notification-lockless-waitfd-no-comp emper-io-notification-waitfd-no-comp
\
emper-io-stealing-lockless-waitfd-no-comp emper-io-stealing-waitfd-no-comp
--
"
${
RESULTS
}
"
\
|
${
PLOT
}
>
${
PLOT_DIR
}
/lockless-vs-locked.tex
|
BOXPLOT
=
"l-vs-ll"
${
PLOT
}
>
${
PLOT_DIR
}
/
${
PLOT_PREFIX
}
-lockless-vs-locked
.tex
${
SUM
}
--yaml
-i
emper-io-notification-lockless-waitfd-no-comp
\
emper-stealing-no-sleep emper-stealing-lockless-no-sleep
--
"
${
RESULTS
}
"
\
|
BOXPLOT
=
"n-vs-ns"
${
PLOT
}
>
${
PLOT_DIR
}
/
${
PLOT_PREFIX
}
-notification-vs-nosleep
.tex
${
SUM
}
--yaml
-i
emper-io-notification-lockless-waitfd-no-comp emper-no-sleep
--
"
${
RESULTS
}
"
\
|
${
PLOT
}
>
${
PLOT_DIR
}
/notification-vs-nosleep.tex
This diff is collapsed.
Click to expand it.
plots/common.tex
0 → 100644
+
7
−
0
View file @
aba782a1
\usepackage
{
pgfplots
}
\pgfplotsset
{
compat=1.17
}
\usepgfplotslibrary
{
statistics
}
\NewDocumentCommand
\Waitfd
{}{
\texttt
{
Suspendfd
}}
\NewDocumentCommand
\waitfd
{}{
\texttt
{
suspendfd
}}
\NewDocumentCommand
\vertPhantom
{}{
\vphantom
{
gG
}}
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