Here you go, a scriptlet fresh out of the oven. Untested, but you get the gist.
import time
from maya import cmds
cmds.currentTime(1)
t0 = time.time()
cmds.currentTime(2)
t1 = time.time()
duration = t1 - t0
print("The time taken was %.2f s" % duration)
print("%d fps" % (1 / duration))
From here, you could measure across multiple frames and draw a plot or to a median/average, or measure a specific frame or section of frames. You could disable viewport rendering, or call it from mayapy for results not including rendering. On Linux, you may want to use time.clock(), or not. Etc. etc.
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CADHeb2ZchRRp6y97VKrHPJtvK1ZSr-%3DTyjzRB9JYc5KjY_W%3Djg%40mail.gmail.com.