You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following is a detailed explanation of the process undertaken to automate the analysis of test results for two artifacts of interest (artifact A and B).
3
+
The following is a detailed explanation of the process undertaken to automate the analysis of test results for two artifacts of interest (artifact A and B).
4
4
5
5
This analysis can be done by hand, by using the [comparison page](https://perf.rust-lang.org/compare.html) and entering the two artifacts of interest in the form at the top.
6
6
@@ -18,11 +18,11 @@ At the core of comparison analysis are the collection of test results for the tw
Analysis of the changes is performed in order to determine whether artifact B represents a performance change over artifact A. At a high level the analysis performed takes the following form:
24
24
25
-
How many _significant_ test results indicate performance changes and what is the magnitude of the changes (i.e., how large are the changes regardless of the direction of change)?
25
+
How many _significant_ test results indicate performance changes and what is the magnitude of the changes (i.e., how large are the changes regardless of the direction of change)?
26
26
27
27
* If there are improvements and regressions with magnitude of medium or above then the comparison is mixed.
28
28
* If there are only either improvements or regressions then the comparison is labeled with that kind.
@@ -37,29 +37,38 @@ Whether we actually _report_ an analysis or not depends on the context and how _
37
37
38
38
### What makes a test result significant?
39
39
40
-
A test result is significant if the relative change percentage meets some threshold. What the threshold is depends of whether the test case is "dodgy" or not (see below for an examination of "dodginess"). For dodgy test cases, the threshold is set at 1%. For non-dodgy test cases, the threshold is set to 0.1%.
41
-
42
-
### What makes a test case "dodgy"?
43
-
44
-
A test case is "dodgy" if it shows signs of either being noisy or highly variable.
45
-
46
-
To determine noise and high variability, the previous 100 test results for the test case in question are examined by calculating relative delta changes between adjacent test results. This is done with the following formula (where `testResult1` is the test result immediately proceeding `testResult2`):
40
+
A test result is significant if the relative change percentage is considered an outlier against historical data. Determining whether a value is an outlier is done through interquartile range "fencing" (i.e., whether a value exceeds a threshold equal to the third quartile plus 1.5 times the interquartile range):
47
41
48
42
```
49
-
testResult2 - testResult1 / testResult1
43
+
interquartile_range = Q3 - Q1
44
+
result > Q3 + (interquartile_range * 1.5)
50
45
```
51
46
52
-
Any relative delta change that is above a threshold (currently 0.1) is considered "significant" for the purposes of dodginess detection.
47
+
(Assuming the data is ordered, Q3 is the median of the upper half of the data while Q1 is the median of the lower half.)
53
48
54
-
A highly variable test case is one where a certain percentage (currently 5%) of relative delta changes are significant. The logic being that test cases should only display significant relative delta changes a small percentage of the time.
49
+
We ignore the lower fence, because result data is bounded by 0.
55
50
56
-
A noisy test case is one where of all the non-significant relative delta changes, the average delta change is still above some threshold (0.001). The logic being that non-significant changes should, on average, being very close to 0. If they are not close to zero, then they are noisy.
51
+
This upper fence is often called the "significance threshold".
57
52
58
53
### How is confidence in whether a test analysis is "relevant" determined?
59
54
60
-
The confidence in whether a test analysis is relevant depends on the number of significant test results and their magnitude (how large a change is regardless of the direction of the change).
55
+
The confidence in whether a test analysis is relevant depends on the number of significant test results and their magnitude.
56
+
57
+
#### Magnitude
58
+
59
+
Magnitude is a combination of two factors:
60
+
* how large a change is regardless of the direction of the change
61
+
* how much that change went over the significance threshold
62
+
63
+
If a large change only happens to go over the significance threshold by a small factor, then the over magnitude of the change is considered small.
64
+
65
+
#### Confidence algorithm
61
66
62
67
The actual algorithm for determining confidence may change, but in general the following rules apply:
63
-
* Definitely relevant: any number of very large changes, a small amount of large and/or medium changes, or a large amount of small changes.
64
-
* Probably relevant: any number of large changes, more than 1 medium change, or smaller but still substantial amount of small changes.
68
+
* Definitely relevant: any number of very large or large changes, a small amount of medium changes, or a large amount of small or very small changes.
69
+
* Probably relevant: any number of very large or large changes, any medium change, or smaller but still substantial amount of small or very small changes.
65
70
* Maybe relevant: if it doesn't fit into the above two categories, it ends in this category.
71
+
72
+
### "Dodgy" Test Cases
73
+
74
+
"Dodgy" test cases are test cases that tend to produce unreliable results (i.e., noise). A test case is considered "dodgy" if its significance threshold is sufficiently far enough away from 0.
0 commit comments