# An Efficient Library for Reliability Block Diagram Evaluation
## 4 Materials and Methods
### Methods  
The evaluation of performance has been conducted through the usage of a test application instrumented in order to measure the execution time of librbd of several RDB blocks over different time instant configurations. In particular, we defined the following set of RBD models to be used during the execution time monitoring:  
* Series blocks with 2, 3, 5, 10 and 15 generic components;
* Series blocks with 2, 3, 5, 10 and 15 identical components;
* Parallel blocks with 2, 3, 5, 10 and 15 generic components;
* Parallel blocks with 2, 3, 5, 10 and 15 identical components;
* 1 oo2, 2 oo3, 3 oo5, 5 oo10 and 8 oo15 blocks with generic components;
* 1 oo2, 2 oo3, 3 oo5, 5 oo10 and 8 oo15 blocks with identical components;
* Bridge block with generic components;
* Bridge block with identical components. Each RBD model has been analyzed for 50,000, 100,000 and 200,000 time instants. To further investigate the performance of _Koo_N RBD blocks, we used the following models and we analyzed them over 100,000 time instants:  
* All blocks ranging from 1 oo15 to 15 oo15 with generic components;
* All blocks ranging from 1 oo15 to 15 oo15 with identical components. The chosen instrumentation method has been implemented through a succession of invocations to clock_gettime API, one immediately preceding the librbd invocation and the other one as soon as librbd returned. The usage of this API has the following advantages and drawbacks:  
* It returns a monotonic clock (i.e., guaranteed to be nondecreasing), which allows to measure the time spent in executing a program routine with a time resolution up to nanoseconds;
* It takes into account not only user time (application time) but also system time;
* It is defined by The Open Group POSIX standard [48]. In order to minimize the impact from the second point, each experiment has been repeated 15 times and, after all experiments were run, the median time of execution has been selected. We chose the median time since it minimizes the impact of the time spent by the OS which is unrelated to the RBD block analysis. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Name** & **Chassis** & **CPU \& RAM** & **OS \& Compiler** \\ \hline \multirow{3}{*}{PC1} & \multirow{3}{*}{Workstation} & Intel i7-2600 & Ubuntu \\  & & @ 3.8 GHz & 18.04\_amd64 \\  & & 16 GB-DDR3 & GCC \\  & & @ 1333 MHz & 5.4.0 \\ \hline \multirow{3}{*}{PC2} & \multirow{3}{*}{Notebook} & Intel i7-600 HQ & Mac OS \\  & & @ 3.5 GHz & 10.13.6 \\  & & 16 GB-IPDDR3 & Apple LLVM \\  & & @ 2133 MHz & 10.0.0 \\ \hline \multirow{3}{*}{PC3} & \multirow{3}{*}{Notebook} & Intel i7-7700 HQ & Ubuntu \\  & & @ 3.8 GHz & 18.04\_amd64 \\  & & 32 GB-DDR4 & GCC \\  & & @ 2400 MHz & 5.4.0 \\ \hline \multirow{3}{*}{PC4} & \multirow{3}{*}{Notebook} & Intel i5-8365U & Windows \\  & & @ 1.9 GHz & 10 \\ \cline{1-1}  & & 16 GB-DDR4 & Cygwin GCC \\ \cline{1-1}  & & @ 2666 MHz & 7.4.0 \\ \hline \multirow{3}{*}{PC5} & \multirow{3}{*}{Raspberry} & 4 \(\times\) Cortex-A53 & Raspberry Pi OS \\ \cline{1-1}  & & @ 1.2 GHz & 10\_AArch32 \\ \cline{1-1}  & Pi 3 & 1 GB-IPDDR2 & GCC \\ \cline{1-1}  & & @ 900 MHz & 8.3.0 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: PCs used for performance evaluation. To compare the performance of librbd w.r.t. SHARPE, we define the following set of RBD models analyzed for 100,000 time instants:  
* Series blocks with 2, 3, 5, 10 and 15 generic components;
* Series blocks with 2, 3, 5, 10 and 15 identical components;
* Parallel blocks with 2, 3, 5, 10 and 15 generic components;
* Parallel blocks with 2, 3, 5, 10 and 15 identical components;
* 1 oo2, 2 oo3, 3 oo5, 5 oo10 and 8 oo15 blocks with generic components;
* 1 oo2, 2 oo3, 3 oo5, 5 oo10 and 8 oo15 blocks with identical components;
* Bridge block with generic components;
* Bridge block with identical components. The comparison experiments were done for series, parallel, \(K\)oo\(N\) and bridge blocks for a time interval of 200,000 time instants.