[PyQt] Creating widget drawing benchmark test
Brent Villalobos
Brent.Villalobos at pdi.dreamworks.com
Sat Apr 25 01:02:35 BST 2009
Has anyone written a widget draw-time benchmarking program? I need to
write a test that will provide an idea of how PyQt performs with a large
number of widgets. I'm thinking of writing an application that creates
a grid of QPushButton widgets. The test then runs when someone pushes a
"Go" button which calls a function that hides and shows each button. It
would look something like this:
def refresh():
startTime = time.time()
for i, b in enumerate(buttons):
b.hide()
b.show()
print "Hide/show buttons in %f seconds" % (time.time()-startTime)
Is this a good test or am I not really testing what I think I'm
testing? If this isn't a good test, anyone have any suggestions for a
simple draw-time benchmarking test?
-Brent
More information about the PyQt
mailing list