Function type to be tested:
[self someFunctionOnSuccess:^{
//Test this block with a test case and check its performance
} onFailure:^{
//Test this block with a test case and check its performance
}];
There are different test cases that I could write for passing and failing the function.
My Question is: How to measure the performace of these closures or blocks after they have completed the execution. For a simple method I could straight away use:
- (void)testPerformance {
[self measureBlock:^{
//Test the performance of this function.
[self simpleFunction];
}];
}
Aucun commentaire:
Enregistrer un commentaire