From 837d90472226602294d6d28b37c79fd5cf057cb9 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 14 Aug 2025 16:12:43 +0200 Subject: [PATCH] thesis: Add performance table --- thesis/src/05.evaluation.tex | 57 +++++++++++++++++++++++++++++++++++- thesis/thesis.tex | 6 ++++ 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/thesis/src/05.evaluation.tex b/thesis/src/05.evaluation.tex index 3f86b75..e404434 100644 --- a/thesis/src/05.evaluation.tex +++ b/thesis/src/05.evaluation.tex @@ -11,6 +11,7 @@ Files, Shared Memory, Semaphores; Related Processes and Inter-Process Communicat Table~\ref{tab:functions} lists all functions presented in the course and their implementation status in \texttt{intercept.so}. As one may see, simple file stream functions are not currently implemented in \texttt{intercept.so}. This is because of time restrictions on this work and the fact, that simple file operations may be tested easily in the conventional way of checking the resulting output. +Note, that the future implementation of single functions is not very complex. All other functions have at least interception and mocking (returning, failing) implemented. For some functions the modification of function arguments has been implemented. @@ -67,13 +68,67 @@ For some functions the modification of function arguments has been implemented. \section{Performance}\label{sec:performance} -Lorem Ipsum. +Although high performance was not a primary goal of this work, the resulting performance degradation by intercepting and manipulation should not be too excessive. +The following two subsections test the performance degradation of \texttt{intercept.so} compared to running a program without any intercepting or hooking. \subsection{Performance when Intercepting}\label{subsec:performance-intercepting} Lorem Ipsum. +\begin{figure} + \centering + \begin{tikzpicture} + \begin{axis}[ + xmin=0, xmax=5000, + ymin=0, ymax=150, + scaled y ticks=false, + ymajorgrids=true, + grid style=dashed, + legend pos=north west, + width=\textwidth, + xlabel=Iterations, + ylabel=Execution Time, + x unit=\#, + y unit=\si{\milli\second}, + ] + + \addplot[color=blue] table [x=Cycles, y expr=\thisrow{Baseline Avg}/1000000, col sep=semicolon] {src/performance/stat.csv}; + \addlegendentry{Baseline} + \addplot[name path=a_top,color=blue!50,forget plot] table [x=Cycles, y expr=(\thisrow{Baseline Avg} + \thisrow{Baseline SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[name path=a_down,color=blue!50,forget plot] table [x=Cycles, y expr=(\thisrow{Baseline Avg} - \thisrow{Baseline SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[blue!20,fill opacity=0.2] fill between[of=a_top and a_down]; + \addlegendentry{Baseline ±SD} + + \addplot[color=green] table [x=Cycles, y expr=\thisrow{Intercept Avg}/1000000, col sep=semicolon] {src/performance/stat.csv}; + \addlegendentry{Intercepting} + \addplot[name path=b_top,color=green!50,forget plot] table [x=Cycles, y expr=(\thisrow{Intercept Avg} + \thisrow{Intercept SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[name path=b_down,color=green!50,forget plot] table [x=Cycles, y expr=(\thisrow{Intercept Avg} - \thisrow{Intercept SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[green!20,fill opacity=0.2] fill between[of=b_top and b_down]; + \addlegendentry{Intercepting ±SD} + + \addplot[color=teal] table [x=Cycles, y expr=(\thisrow{Intercept Avg} - 10000000) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addlegendentry{Intercepting -- 10 ms} + + \addplot[color=red] table [x=Cycles, y expr=\thisrow{Stderr Avg}/1000000, col sep=semicolon] {src/performance/stat.csv}; + \addlegendentry{Logging to stderr} + \addplot[name path=c_top,color=red!50,forget plot] table [x=Cycles, y expr=(\thisrow{Stderr Avg} + \thisrow{Stderr SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[name path=c_down,color=red!50,forget plot] table [x=Cycles, y expr=(\thisrow{Stderr Avg} - \thisrow{Stderr SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[red!20,fill opacity=0.2] fill between[of=c_top and c_down]; + \addlegendentry{Logging to stderr ±SD} + + \addplot[color=orange] table [x=Cycles, y expr=\thisrow{File Avg}/1000000, col sep=semicolon] {src/performance/stat.csv}; + \addlegendentry{Logging to File} + \addplot[name path=d_top,color=orange!50,forget plot] table [x=Cycles, y expr=(\thisrow{File Avg} + \thisrow{File SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[name path=d_down,color=orange!50,forget plot] table [x=Cycles, y expr=(\thisrow{File Avg} - \thisrow{File SD}) / 1000000, col sep=semicolon] {src/performance/stat.csv}; + \addplot[orange!20,fill opacity=0.2] fill between[of=d_top and d_down]; + \addlegendentry{Logging to File ±SD} + \end{axis} + \end{tikzpicture} + \caption{Execution times of a simple program using \texttt{intercept.so} with different output modes.} + \label{fig:performance} +\end{figure} + \subsection{Performance when Manipulating}\label{subsec:performance-manipulating} diff --git a/thesis/thesis.tex b/thesis/thesis.tex index dc06fbe..7abf26c 100644 --- a/thesis/thesis.tex +++ b/thesis/thesis.tex @@ -43,8 +43,14 @@ \usepackage{pgf-umlsd} \usepackage{textcomp} \usepackage{tikz} +\usepackage{csvsimple} \usetikzlibrary{shapes} +\usetikzlibrary{intersections} +\usepackage{pgfplots} +\usepgfplotslibrary{fillbetween} +\usepgfplotslibrary{units} \usepackage[flushleft]{threeparttable} +\usepackage{siunitx} \newcommand{\newthreadShift}[4][gray!30]{ \newinst[#4]{#2}{#3}