Original Post
Hey all, I'm doing some university work, and as my research project I have to write a distributed video decoding framework (sort of, skimming on the details a bit...). My topic is mainly about the feasibility of this, so I'm writing it in a simulation environment. I've spoke with my supervisor about how what statistics would be interesting, and he's mentioned it would be good to see how balanced the distribution is, and wants me to come back with a measure of thread execution time. This is running on Windows, and I've looked through the .NET class libraries and can't find anything useful. Originally, I planned to just use QueryPerformanceCounter - but obviously this will not give a true measure of time spent in a thread (ie, context switches half way through areas I'm timing). I also don't want to lock each region I want to time, as that's hardly representative of what would happen in reality. So, cut the story short - anyone know how I could measure the time spent on a per thread basis? I'm open to other methods, time doesn't necessarily have to mean duration in seconds, I'm thinking my best option may well be to have a "frame cost" variable, that is incremented after various (short) blocks of code execute. Any ideas?