Profile Expression
Profile
With the profile expression, you can instrument your code to measure its performance. The following is the syntax for using a profile expression in a code block.
With the profile expression, you can instrument your code to measure its performance. The following is the syntax for using a profile expression in a code block.
| | code-before |
| --- | --- |
| | profile: |
| | code-to-measure |
| | code-after |
Copy full snippet
In this example, slow-code represents a code block that the user wants to measure for performance. When the code is run, the amount of time in milliseconds between entering and exiting the profile code block is printed to the Output Log in UEFN.
You can find the output for the code profiled as LogVerse: VerseProfile: 0.023900 ms. If you have multiple profile expressions in your code and want to organize the output, you can add a string to your profile expression as a user tag:
| | profile(“User String to Categorize Output”): |
| --- | --- |
| | code-to-measure |
Copy full snippet
In this example, the output would look like LogVerse: VerseProfile: User String to Categorize Output 0.023900 ms.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.