Recording the time a thread took to execute
Recording the time a thread took to execute
- Subject: Recording the time a thread took to execute
- From: Ken Tabb <email@hidden>
- Date: Wed, 28 May 2003 18:56:07 +0100
Hi,
I have an app which I'm developing to test various image processing
algorithms, and how much of a difference the AltiVec / SMP
optimisations made to it. The idea being so that our research group can
evaluate different ways of parallelising a certain task, to see which
offered best results (on G4 processors and "Apple's next" family of
processors, if they change soon).
Whilst actual performance of the algorithms isn't important (in terms
of how quickly the kernel schedules them and the clock time when they
started/stopped), I'm very interested in how long a given thread took
to operate (i.e. active CPU time during it's life). In other words, I'm
after per-thread profiling, built into the app itself (not using
another app like Sampler, for instance), that's irrespective of how
many other things you're running (as it only measures the active CPU
time), and irrespective of the 'nice' value for the thread etc.
I've looked at using NSThreads, but, whilst the easiest route for
multithreading, they don't seem to have much in the way of performance
analysis; what's the best way of doing this in Obj-C / Cocoa / C? I'm
guessing using pthreads would offer more in the way of performance
analysis than NSThreads, but am open to suggestions.
All I need to have as results is:
Thread1 took X milliseconds to perform [self processImage]
Thread2 took Y milliseconds to perform [self processImage]
Thread3 took Z milliseconds to perform [self processImage]
Thanks in advance for any tips / leads,
Ken
- - - - - - - - - -
Ken Tabb
Mac & UNIX Technical bloke (C, C++, Obj-C, Java) - Health & Human
Sciences
Machine Vision & Neural Network researcher bloke - Computer Science Dept
University of Hertfordshire, UK
http://www.health.herts.ac.uk/ken/
Certified non-Microsoft Solution Provider
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.