@@ -39,9 +39,28 @@ internal protocol PerformanceMetric {
39
39
func failureMessage( ) -> String ?
40
40
}
41
41
42
+ /// Protocol used by `PerformanceMeter` to report measurement results
42
43
internal protocol PerformanceMeterDelegate {
44
+ /// Reports a string representation of the gathered performance metrics
45
+ /// - Parameter results: The raw measured values, and some derived data such
46
+ /// as average, and standard deviation
47
+ /// - Parameter file: The source file name where the measurement was invoked
48
+ /// - Parameter line: The source line number where the measurement was invoked
43
49
func recordMeasurements( results: String , file: StaticString , line: UInt )
50
+
51
+ /// Reports a test failure from the analysis of performance measurements.
52
+ /// This can currently be caused by an unexpectedly large standard deviation
53
+ /// calculated over the data.
54
+ /// - Parameter description: An explanation of the failure
55
+ /// - Parameter file: The source file name where the measurement was invoked
56
+ /// - Parameter line: The source line number where the measurement was invoked
44
57
func recordFailure( description: String , file: StaticString , line: UInt )
58
+
59
+ /// Reports a misuse of the `PerformanceMeter` API, such as calling `
60
+ /// startMeasuring` multiple times.
61
+ /// - Parameter description: An explanation of the misuse
62
+ /// - Parameter file: The source file name where the misuse occurred
63
+ /// - Parameter line: The source line number where the misuse occurred
45
64
func recordAPIViolation( description: String , file: StaticString , line: UInt )
46
65
}
47
66
0 commit comments