Skip to content
Snippets Groups Projects
Commit 972812b2 authored by dimitri.lizzi's avatar dimitri.lizzi
Browse files

write about protocols benchmarks

parent f267a3c3
Branches
No related tags found
No related merge requests found
doc/charts/chart_protocols.png

129 B

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Created with matplotlib (https://matplotlib.org/) -->
<svg height="345.6pt" version="1.1" viewBox="0 0 460.8 345.6" width="460.8pt" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<style type="text/css">
*{stroke-linecap:butt;stroke-linejoin:round;}
</style>
</defs>
<g id="figure_1">
<g id="patch_1">
<path d="M 0 345.6
L 460.8 345.6
L 460.8 0
L 0 0
z
" style="fill:#ffffff;"/>
</g>
<g id="axes_1">
<g id="patch_2">
<path d="M 57.6 307.584
L 414.72 307.584
L 414.72 41.472
L 57.6 41.472
z
" style="fill:#ffffff;"/>
</g>
<g id="matplotlib.axis_1"/>
<g id="matplotlib.axis_2">
<g id="ytick_1">
<g id="line2d_1">
<defs>
<path d="M 0 0
L -3.5 0
" id="mbf7378a3ce" style="stroke:#000000;stroke-width:0.8;"/>
</defs>
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#mbf7378a3ce" y="271.296"/>
</g>
</g>
<g id="text_1">
<!-- −0.04 -->
<defs>
<path d="M 10.59375 35.5
L 73.1875 35.5
L 73.1875 27.203125
L 10.59375 27.203125
z
" id="DejaVuSans-8722"/>
<path d="M 31.78125 66.40625
Q 24.171875 66.40625 20.328125 58.90625
Q 16.5 51.421875 16.5 36.375
Q 16.5 21.390625 20.328125 13.890625
Q 24.171875 6.390625 31.78125 6.390625
Q 39.453125 6.390625 43.28125 13.890625
Q 47.125 21.390625 47.125 36.375
Q 47.125 51.421875 43.28125 58.90625
Q 39.453125 66.40625 31.78125 66.40625
z
M 31.78125 74.21875
Q 44.046875 74.21875 50.515625 64.515625
Q 56.984375 54.828125 56.984375 36.375
Q 56.984375 17.96875 50.515625 8.265625
Q 44.046875 -1.421875 31.78125 -1.421875
Q 19.53125 -1.421875 13.0625 8.265625
Q 6.59375 17.96875 6.59375 36.375
Q 6.59375 54.828125 13.0625 64.515625
Q 19.53125 74.21875 31.78125 74.21875
z
" id="DejaVuSans-48"/>
<path d="M 10.6875 12.40625
L 21 12.40625
L 21 0
L 10.6875 0
z
" id="DejaVuSans-46"/>
<path d="M 37.796875 64.3125
L 12.890625 25.390625
L 37.796875 25.390625
z
M 35.203125 72.90625
L 47.609375 72.90625
L 47.609375 25.390625
L 58.015625 25.390625
L 58.015625 17.1875
L 47.609375 17.1875
L 47.609375 0
L 37.796875 0
L 37.796875 17.1875
L 4.890625 17.1875
L 4.890625 26.703125
z
" id="DejaVuSans-52"/>
</defs>
<g transform="translate(19.954687 275.095219)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-8722"/>
<use x="83.789062" xlink:href="#DejaVuSans-48"/>
<use x="147.412109" xlink:href="#DejaVuSans-46"/>
<use x="179.199219" xlink:href="#DejaVuSans-48"/>
<use x="242.822266" xlink:href="#DejaVuSans-52"/>
</g>
</g>
</g>
<g id="ytick_2">
<g id="line2d_2">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#mbf7378a3ce" y="222.912"/>
</g>
</g>
<g id="text_2">
<!-- −0.02 -->
<defs>
<path d="M 19.1875 8.296875
L 53.609375 8.296875
L 53.609375 0
L 7.328125 0
L 7.328125 8.296875
Q 12.9375 14.109375 22.625 23.890625
Q 32.328125 33.6875 34.8125 36.53125
Q 39.546875 41.84375 41.421875 45.53125
Q 43.3125 49.21875 43.3125 52.78125
Q 43.3125 58.59375 39.234375 62.25
Q 35.15625 65.921875 28.609375 65.921875
Q 23.96875 65.921875 18.8125 64.3125
Q 13.671875 62.703125 7.8125 59.421875
L 7.8125 69.390625
Q 13.765625 71.78125 18.9375 73
Q 24.125 74.21875 28.421875 74.21875
Q 39.75 74.21875 46.484375 68.546875
Q 53.21875 62.890625 53.21875 53.421875
Q 53.21875 48.921875 51.53125 44.890625
Q 49.859375 40.875 45.40625 35.40625
Q 44.1875 33.984375 37.640625 27.21875
Q 31.109375 20.453125 19.1875 8.296875
z
" id="DejaVuSans-50"/>
</defs>
<g transform="translate(19.954687 226.711219)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-8722"/>
<use x="83.789062" xlink:href="#DejaVuSans-48"/>
<use x="147.412109" xlink:href="#DejaVuSans-46"/>
<use x="179.199219" xlink:href="#DejaVuSans-48"/>
<use x="242.822266" xlink:href="#DejaVuSans-50"/>
</g>
</g>
</g>
<g id="ytick_3">
<g id="line2d_3">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#mbf7378a3ce" y="174.528"/>
</g>
</g>
<g id="text_3">
<!-- 0.00 -->
<g transform="translate(28.334375 178.327219)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-48"/>
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
<use x="95.410156" xlink:href="#DejaVuSans-48"/>
<use x="159.033203" xlink:href="#DejaVuSans-48"/>
</g>
</g>
</g>
<g id="ytick_4">
<g id="line2d_4">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#mbf7378a3ce" y="126.144"/>
</g>
</g>
<g id="text_4">
<!-- 0.02 -->
<g transform="translate(28.334375 129.943219)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-48"/>
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
<use x="95.410156" xlink:href="#DejaVuSans-48"/>
<use x="159.033203" xlink:href="#DejaVuSans-50"/>
</g>
</g>
</g>
<g id="ytick_5">
<g id="line2d_5">
<g>
<use style="stroke:#000000;stroke-width:0.8;" x="57.6" xlink:href="#mbf7378a3ce" y="77.76"/>
</g>
</g>
<g id="text_5">
<!-- 0.04 -->
<g transform="translate(28.334375 81.559219)scale(0.1 -0.1)">
<use xlink:href="#DejaVuSans-48"/>
<use x="63.623047" xlink:href="#DejaVuSans-46"/>
<use x="95.410156" xlink:href="#DejaVuSans-48"/>
<use x="159.033203" xlink:href="#DejaVuSans-52"/>
</g>
</g>
</g>
</g>
<g id="patch_3">
<path d="M 57.6 307.584
L 57.6 41.472
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
</g>
<g id="patch_4">
<path d="M 414.72 307.584
L 414.72 41.472
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
</g>
<g id="patch_5">
<path d="M 57.6 307.584
L 414.72 307.584
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
</g>
<g id="patch_6">
<path d="M 57.6 41.472
L 414.72 41.472
" style="fill:none;stroke:#000000;stroke-linecap:square;stroke-linejoin:miter;stroke-width:0.8;"/>
</g>
</g>
</g>
</svg>
#!/usr/bin/env python3
import csv
from sys import stdin, argv
from typing import TextIO
import matplotlib.pyplot as plt
def csv_to_barchart(file: TextIO) -> plt.Figure:
next(file) # skip header
csv_reader = csv.reader(file, delimiter=';', quoting=csv.QUOTE_NONNUMERIC)
xs=[]
xticks=[]
ys=[]
for (x, (xtick, y)) in enumerate(csv_reader):
xs.append(x)
xticks.append(xtick)
ys.append(y)
fig = plt.figure()
plt.bar(xs, ys)
plt.xticks(xs, xticks)
return fig
if __name__ == '__main__':
filenames = argv[1:]
fig = csv_to_barchart(stdin)
for filename in filenames:
fig.savefig(filename)
\ No newline at end of file
......@@ -34,3 +34,11 @@
!!define{!!acronymdescription{short}}{!!exec{cat acronyms.md | sed -n 's/^- \*\*!!short\*\*\: //p' | pandoc --from=markdown --to=plain | tr '\n' ' '}}
!!define{!!acronym{short}}{!!defeval{tmp_acronymdescription}{!!acronymdescription{!!short}}!!ifeq{!!tmp_acronymdescription}{}!!warning{No definition found for acronym '!!short'}!!endif<abbr title="!!tmp_acronymdescription">!!short</abbr>}
!!define{!!inlinemath{content}}{$`!!content`$}
!!define{!!displaymath{content}}{
```math
!!content
```
}
\ No newline at end of file
......@@ -23,4 +23,8 @@ EOF-DEFACRONYM-GPP-MACRO
!!define{!!comment}{}
!!define{!!barchart{ref_id}{description}{chartdata}}{!!exec{>/dev/null ./csv2barchart.py "charts/!!ref_id.png" "charts/!!ref_id.svg" << 'EOF_BARCHART_MACRO'
!!chart_data
EOF_BARCHART_MACRO}!!svgref{!!ref_id}{!!description}{charts/!!ref_id}}
!!endif
\ No newline at end of file
......@@ -25,3 +25,7 @@
}
!!define{!!acronym{short}}{[!!short](#acronym__!!short)}
!!define{!!inlinemath{content}}{$!!content$}
!!define{!!displaymath{content}}{$$ !!content $$}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment