Skip to content

Commit 2fea2db

Browse files
authored
type(docs): Adding Documentation for Resilience Score Calculation (#42)
* Adding Documentation for Resilience Score Calculation Signed-off-by: Sayan Mondal <sayan@chaosnative.com>
1 parent a6cbe11 commit 2fea2db

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

website/docs/d0-observe.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,44 @@ On hovering over the bar, the user can view the following information related to
4545
- Failed Tests
4646

4747
On clicking the bar, a table is shown below the graph which displays all the experiments present in the workflow run and their individual result points. These result points are then used to calculate the **Resilience Score** of the workflow which is displayed at the end of the table.
48+
49+
### 2. Resilience Score Calculation
50+
51+
A Resilience Score is the measure of how resilient your workflow is considering all the chaos experiments and their individual result points. This calculation takes into account the individual experiment weights (from a range of 1-10) which are relative to each other.
52+
53+
#### **The Importance of Weights in experiments**
54+
55+
Giving a weightage to your experiment is a way of signifying/attaching the importance/priority of that experiment in your workflow. The higher the weight, the more importance it holds.
56+
57+
The weight priority is generally divided into three sections:
58+
* **0-3:** Low Priority
59+
* **4-6:** Medium Priority
60+
* **7-10:** High Priority
61+
62+
#### **The Calculation**
63+
64+
Once a weight has been assigned to the experiment, we look for the [Probe Success Percentage](https://docs.litmuschaos.io/docs/litmus-probe/) for that experiment itself (Post Chaos) and calculate the total resilience result for that experiment as a multiplication of the weight given and the probe success percentage returned after the Chaos Run.
65+
66+
```doc
67+
Total Resilience for one single experiment = (Weight Given to that experiment * Probe Success Percentage)
68+
```
69+
> If an experiment doesn't have a probe in it, the probe success percentage returned can either be 0 or 100 based on the experiment verdict. If the experiment passed then it returns 100 else 0.
70+
71+
The Final Resilience Score is calculated by dividing the total test result by the sum of all the weights of all the experiments combined in a single workflow.
72+
73+
For example, if we consider two experiments in a workflow, here is what the calculation would look like.
74+
> Considering Probe Success Percentage is 100
75+
76+
| Experiment | Weight | Probe Success Percentage | Total Test Result |
77+
| :------------- | :----------: | -----------: | -----------: |
78+
| exp1 | 3 | 100 | (3 * 100) = 300 |
79+
| exp2 | 9 | 100 | (9 * 100) = 900 |
80+
| | Weight Sum = 3 + 9 = 12 | | Total Test Result = 300 + 900 = 1200 |
81+
82+
```
83+
Resilience Score = Total Test Result / Weight Sum
84+
= 1200 / 12
85+
= 100%
86+
```
87+
88+
<iframe width="560" height="315" src="https://www.youtube.com/embed/OuB3dS05DHU" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

0 commit comments

Comments
 (0)