Created
October 22, 2015 18:31
-
-
Save JokerMartini/9d7442648000008c4080 to your computer and use it in GitHub Desktop.
Maxscript: This snippet demonstrates how to timestamp memory and execution time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Info Logging Start | |
clearlistener() | |
RunStartTime = (timestamp()) | |
RunStartMemory = heapfree | |
-- Function goes here | |
--Info Logging End | |
RunEndTime = (timestamp()) | |
RunEndMemory = heapfree | |
RunMemoryUsed = RunStartMemory - RunEndMemory | |
RunTimeLength = ((dotnetclass "TimeSpan").FromMilliseconds (RunEndTime - RunStartTime)).ToString() | |
Format "\n-----------------------------------------------------------" | |
Format "\nMemory Used:\t%\n" RunMemoryUsed | |
Format "Process Time:\t%\n" RunTimeLength |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment