Hello!
I would like to add some automated performance test to my Objective-C application. (This is a game, so that I would like to see the current performance of key parts of the engine by simply running a set of tests.) To do this I want to write some timing support routine, something like this:
- (void) benchmarkSelector: (SEL) msg onObject: (id) target
{
// run the selector thousands of times, print detailed stats
}
The problem is that I am interested in milliseconds and I am afraid that calling performSelector
in the benchmarking code would skew the results quite a bit. How would you go around this? Should I go down to objc_msgSend
?