Here you go, a scriptlet fresh out of the oven. Untested, but you get the gist.
import timefrom 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. On Tue, 31 Dec 2019 at 03:12, Ravi Jagannadhan <enr...@gmail.com> wrote: > Hi there, I need to automate some testing in Maya and am looking to script > something that will measure the playback performance. Does anyone have a > scriptlet that does this already? Thanks in advance. > > Thank you for your time, > Ravi > -- > Where we have strong emotions, we're liable to fool ourselves - Carl Sagan > > -- > 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_maya+unsubscr...@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 > <https://groups.google.com/d/msgid/python_inside_maya/CADHeb2ZchRRp6y97VKrHPJtvK1ZSr-%3DTyjzRB9JYc5KjY_W%3Djg%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBY-2Ubfw06oQXg8QBBBsEOb0Yxkjw1Po6RnQprygdkjA%40mail.gmail.com.