\clearpage
\appendix

\section{Some scripts to do result processing}

The script that converts the output from the statsd to a \LaTeX\xspace table format.

\begin{lstlisting}
cut -d ',' -f 2,5,8,11,14,17,20,23,26,29,32,35 | awk 'BEGIN {FS=",";}; {if (NR == 1) {print "prepre & premix & prepost & realpre & realmix & realpost \\\\\\hline\\hline";} else{ OFMT="%.2f"; c=1000000000; print ($5-$6)/c,"&",($1-$2)/c,"&",($3-$4)/c,"&",($11-$12)/c,"&",($7-$8)/c,"&",($9-$10)/c,"\\\\\\hline";}}'
\end{lstlisting}

Script that calculates the mean and standard deviation of each column.

\begin{lstlisting}
tail -n +2 | cut -d ',' -f 2,5,8,11,14,17,20,23,26,29,32,35 | awk 'BEGIN {FS=",";}; { OFMT="%.2f"; c=1000000000; print ($5-$6)/c,($1-$2)/c,($3-$4)/c,($11-$12)/c,($7-$8)/c,($9-$10)/c;}' | awk '{for(i=1;i<=NF;i++) {sum[i] += $i; sumsq[i] += ($i)^2}} END {for (i=1;i<=NF;i++) {printf " & %.3f (%.3f)", sum[i]/NR, sqrt((sumsq[i]-sum[i]^2/NR)/NR)} printf("\n")}'
\end{lstlisting}

\section{PC specifications}
\label{app-specs}

\begin{table}[!ht]
\resizebox{\columnwidth}{!}{
\begin{tabular}{|l l|}
\hline
CPU: &Intel Core i7 960 @ 3.20GHz\\
Microcode: &0x19 \\
RAM: &3x 4GB @ 1066 MHz DDR3 \\
Bogomips: &6619.51 \\
OS: &Arch Linux \\
Turbo Boost: &off \\
\hline
\end{tabular}
}
\caption{Basic PC specs}
\end{table}

\begin{table}[!ht]
\noindent\resizebox{\columnwidth}{!}{
\begin{tabular}{|l r r r|}
\hline
System Benchmarks Index Values              & BASELINE  &     RESULT  &  INDEX\\
Dhrystone 2 using register variables        & 116700.0  & 30352428.6  & 2600.9\\
Double-Precision Whetstone                  &     55.0  &     3953.8  &  718.9\\
Execl Throughput                            &     43.0  &     4866.8  & 1131.8\\
File Copy 1024 bufsize 2000 maxblocks       &   3960.0  &  1021697.7  & 2580.0\\
File Copy 256 bufsize 500 maxblocks         &   1655.0  &   287500.0  & 1737.2\\
File Copy 4096 bufsize 8000 maxblocks       &   5800.0  &  2065991.1  & 3562.1\\
Pipe Throughput                             &  12440.0  &  2081172.9  & 1673.0\\
Pipe-based Context Switching                &   4000.0  &   137521.7  &  343.8\\
Process Creation                            &    126.0  &     5557.8  &  441.1\\
Shell Scripts (1 concurrent)                &     42.4  &     1936.9  &  456.8\\
Shell Scripts (8 concurrent)                &      6.0  &     1135.7  & 1892.8\\
System Call Overhead                        &  15000.0  &  3185882.9  & 2123.9\\
                                            &           &             & ======\\
System Benchmarks Index Score               &           &             & 1258.2\\
\hline
\end{tabular}
}
\caption{Unix Bench index results to give a comparable baseline}
\end{table}

\clearpage

\section{Tables}
\label{app-tables}

\newcommand{\rtable}[2]{
\begin{table}[!ht]
\centering
\resizebox{\columnwidth}{!}{
\begin{tabular}{|c|c|c|c|c|c|}
\hline
\input{#1}
\end{tabular}
}
\caption{#2}
\end{table}
}

\vspace{0.42em}

\rtable{results/node1_500_ec.tab}{Timings of Node 1 elliptic curve algorithm with 500 clients}

\rtable{results/node2_500_ec.tab}{Timings of Node 2 elliptic curve algorithm with 500 clients}

\rtable{results/node3_500_ec.tab}{Timings of Node 3 elliptic curve algorithm with 500 clients}

\rtable{results/node1_500_mg.tab}{Timings of Node 1 multiplicative group algorithm with 500 clients}

\rtable{results/node2_500_mg.tab}{Timings of Node 2 multiplicative group algorithm with 500 clients}

\rtable{results/node3_500_mg.tab}{Timings of Node 3 multiplicative group algorithm with 500 clients}

\clearpage
%Keep this as last appendix.
\section{Reference manual}

\includepdf[pages=1]{appendices/refman.pdf}
\includepdf[pages=2-]{appendices/refman.pdf}