PDA

View Full Version : How to calculate rendring time of Qpixmzp or graphicsview



moh.gup@gmail.com
5th May 2011, 01:06
Hi,
Please suggest me How to calculate rendring time of Qpixmzp or graphicsview.
Is any library present in Qt for calclating the same.

Thanks

SixDegrees
5th May 2011, 04:39
Pretty much impossible to do this by algorithm. The number of variables - CPU and graphics card characteristics, system memory, which operating system, which underlying graphics library, system load and many others - is too large and varied.

You can easily time some test images yourself with various timer functions, or insert a timer within a program that accumulates estimates as it runs on a given system that will, over time, converge on a reasonably accurate estimate, but even that will always be an approximation at best.

moh.gup@gmail.com
6th May 2011, 01:17
Hi,
Thanks for reply.
IS there any other way to measure perfomance of moudle. in term of sapce time complexicity.
Is any such library given in Qt ?

Thanks

MarekR22
6th May 2011, 09:10
QTestLib (http://doc.qt.nokia.com/latest/qtestlib-manual.html) has QBENCHMARK. See example here (http://doc.qt.nokia.com/latest/qtestlib-tutorial5.html). But in case of painting performance you have to find alternative way or workarounds (paint event of widgets is synchronized with refresh rate of screen).
Once I did this kind of test by putting in graphics view lots of objects of one kind and animating some of them (I measured nr of paint event calls in 4 second period, nr of object was so big so frames per second were smaller then refresh rate of screen so I have warranty that I measure performance of my painting not screen refresh rate).