Skip to content

Commit

Permalink
add performance graphs and generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ajuvercr committed Feb 12, 2024
1 parent b68f8a9 commit c3cc54e
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 34 deletions.
2 changes: 2 additions & 0 deletions perf/perftest-outband.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ let main = async function () {
name: test.name,
opsPerSecond: test.hz,
samples: test.stats.sample.length,
mean: test.stats.mean,
deviation: test.stats.deviation,
};
});
renderResults("outband", results);
Expand Down
6 changes: 3 additions & 3 deletions perf/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const renderResults = (prefix, results) => {
const renderAsTikz = (results) => {
const names = results.map((x) => x.name.replaceAll("#", "\\#")).join(",");
const coords = results.map((x) =>
` (${x.name}, ${x.mean * 1000}) +- (0, ${
x.deviation * 1000
` (${x.name}, ${x.mean * 1000 * 1000}) +- (0, ${
x.deviation * 1000 * 1000
})`
).join("\n");

Expand All @@ -38,7 +38,7 @@ const renderAsTikz = (results) => {
enlargelimits=0.15,
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
ylabel={Duration per extraction (ms)},
ylabel={Duration per extraction ($\\mu s$)},
symbolic x coords={${names}},
xtick=data,
x tick label style={font=\\footnotesize,rotate=45, anchor=east},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ <h1 class="text-2xl font-bold">Benchmark Results</h1>
<canvas id="chart"></canvas>
<script>
const labels = ["CBDAndBlankNode","CBDAndNamedGraphs","CBDAndSimpleShape","CBDAndSimpleShapeAndNamedGraphs","CBDAndShaclExtended","CBDAndShaclExtendedComplex"];
const data = [66926.98746697216,68299.00521066666,59854.072523159,57250.05353245725,43594.523972527844,42303.081011844115];
const data = [73891.29379006542,74042.23821375998,61383.47878901112,58726.79982527499,45183.04335815451,43619.3708893878];
const chart = new Chart('chart', {
type: 'bar',
data: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
[
{
"name": "CBDAndBlankNode",
"opsPerSecond": 66926.98746697216,
"samples": 131,
"mean": 0.000014941655643674245,
"deviation": 0.0000025718418367606917
"opsPerSecond": 73891.29379006542,
"samples": 132,
"mean": 0.00001353339410785156,
"deviation": 0.000001865272700289026
},
{
"name": "CBDAndNamedGraphs",
"opsPerSecond": 68299.00521066666,
"samples": 134,
"mean": 0.000014641501686818481,
"deviation": 0.0000013242069680785225
"opsPerSecond": 74042.23821375998,
"samples": 135,
"mean": 0.00001350580458025863,
"deviation": 9.60240723056626e-7
},
{
"name": "CBDAndSimpleShape",
"opsPerSecond": 59854.072523159,
"opsPerSecond": 61383.47878901112,
"samples": 128,
"mean": 0.000016707300904430114,
"deviation": 0.0000022418445705702137
"mean": 0.000016291028461212273,
"deviation": 0.0000024678186743238127
},
{
"name": "CBDAndSimpleShapeAndNamedGraphs",
"opsPerSecond": 57250.05353245725,
"samples": 134,
"mean": 0.000017467232575303387,
"deviation": 0.0000010907353756849622
"opsPerSecond": 58726.79982527499,
"samples": 131,
"mean": 0.00001702800089525085,
"deviation": 0.0000018128127251347247
},
{
"name": "CBDAndShaclExtended",
"opsPerSecond": 43594.523972527844,
"opsPerSecond": 45183.04335815451,
"samples": 132,
"mean": 0.000022938660842590563,
"deviation": 0.000004223934830317749
"mean": 0.000022132196631228533,
"deviation": 0.000004149746075910502
},
{
"name": "CBDAndShaclExtendedComplex",
"opsPerSecond": 42303.081011844115,
"samples": 131,
"mean": 0.000023638940145282035,
"deviation": 0.000004389855872577435
"opsPerSecond": 43619.3708893878,
"samples": 132,
"mean": 0.000022925594285526275,
"deviation": 0.000004067464891236272
}
]
Original file line number Diff line number Diff line change
@@ -1,28 +1,32 @@

\begin{figure}
\centering
\begin{tikzpicture}
\begin{axis}[
ybar,
enlargelimits=0.15,
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
ylabel={Duration per extraction (ms)},
ylabel={Duration per extraction (μs)},
symbolic x coords={CBDAndBlankNode,CBDAndNamedGraphs,CBDAndSimpleShape,CBDAndSimpleShapeAndNamedGraphs,CBDAndShaclExtended,CBDAndShaclExtendedComplex},
xtick=data,
x tick label style={font=ootnotesize,rotate=45, anchor=east},
x tick label style={font=\footnotesize,rotate=45, anchor=east},
nodes near coords align={horizontal},
]
\addplot+[
error bars/.cd,
y dir=both,
y explicit
] coordinates {
(CBDAndBlankNode, 0.014941655643674244) +- (0, 0.0025718418367606916)
(CBDAndNamedGraphs, 0.014641501686818482) +- (0, 0.0013242069680785226)
(CBDAndSimpleShape, 0.016707300904430115) +- (0, 0.0022418445705702137)
(CBDAndSimpleShapeAndNamedGraphs, 0.017467232575303387) +- (0, 0.001090735375684962)
(CBDAndShaclExtended, 0.022938660842590563) +- (0, 0.004223934830317749)
(CBDAndShaclExtendedComplex, 0.023638940145282034) +- (0, 0.0043898558725774355)
(CBDAndBlankNode, 13.53339410785156) +- (0, 1.8652727002890261)
(CBDAndNamedGraphs, 13.50580458025863) +- (0, 0.960240723056626)
(CBDAndSimpleShape, 16.29102846121227) +- (0, 2.4678186743238126)
(CBDAndSimpleShapeAndNamedGraphs, 17.02800089525085) +- (0, 1.8128127251347248)
(CBDAndShaclExtended, 22.13219663122853) +- (0, 4.149746075910502)
(CBDAndShaclExtendedComplex, 22.925594285526273) +- (0, 4.067464891236272)

};
\end{axis}
\end{tikzpicture}
\caption{Graph depicting performance of inband extraction algorithm}
\end{figure}

0 comments on commit c3cc54e

Please sign in to comment.