For the Udon programs placed in the scene you have open, this shows the instruction counts and the number of extern calls in your browser. Programs built by compilers other than TsukimiSharp are shown too.
- Choose Tsukimi Profiler from the TsukimiCode menu
- The Unity editor opens one port on
127.0.0.1 and opens the page in your browser
| |
|---|
| Port | It uses the first free port starting at 8787. If every candidate is taken, an error appears in the console |
| If the browser does not open | The URL to open is printed to the console |
| What the page shows | The scene as it was when you chose the menu item. After changing the scene or your code, choose the menu item again |
| When the port opens | Only when you choose the menu item. Nothing is opened when the editor starts |
| Element | Description |
|---|
| Program | Chooses which program to show. When the same program is placed more than once, the count is appended to its name |
| Map | Draws entry points and nested loops as a diagram |
| Table | Shows the same content as a table of numbers |
| Code | Shows the instructions that run, and decompiled pseudocode |
| Measure | Runs the program being shown and counts the extern calls made by each entry point |
| Number | How it is counted |
|---|
instructions | The number of instructions in that method’s or loop’s range |
externs (static) | The number of externs in that method’s or loop’s range. What happens inside the methods it calls is not included |
self | The count for the range minus the counts for the loops directly inside it |
externs (measured) | How many externs the entry point called when you ran it with Measure. Calls made inside the methods it calls are included |
ns / iteration | A rough run time for one turn of the loop, in nanoseconds. It is never multiplied by the trip count |
| How to read it | Meaning |
|---|
| Looking at static counts alone | They show where the code is. They do not include how many times a loop runs, so they do not show where the time goes |
| measured > static | That entry point calls other methods |
| measured < static | Some branches were not taken in that run |
| Measured counts for loops | There are none. The run records how many calls were made, not which line made them |
| Control | Description |
|---|
| Chart | Chooses the diagram shape, Treemap or Icicle. It starts on Treemap |
| Weight | Chooses which number the areas represent: externs (static), instructions, or externs (measured). Under externs (measured), loops that have no measured count are drawn hatched |
| Clicking a block | Zooms into that method or loop |
| Control or marker | Description |
|---|
| Budget (externs) | Sets a target number of extern calls. Rows are compared using the measured count when there is one and the static count otherwise, and rows above the target are marked over |
| Over budget only | Shows only the rows marked over |
| Flatten & sort | Drops the nesting and sorts. Clicking a column header also sorts |
every frame | Marks entry points that are called every frame |
really a method call | Marks rows that look like a loop but are actually a call to a method that appears earlier in the file |
| Control or marker | Description |
|---|
| Instructions | Shows the instructions that actually run after optimization. Extern lines are colored, and the number of vertical bars on the left is how deeply that line is nested in loops |
| extern lines only | Shows only the extern lines |
| Decompiled | Shows pseudocode rebuilt from the instructions. It is not the source you wrote. It is shown only for TsukimiSharp programs |
| The list on the left | Lists each entry point with its measured and static extern counts as measured / static |
| |
|---|
| When it runs | Only when you press Measure. Nothing runs when you choose the menu item |
| What it runs | The one program being shown. Only TsukimiSharp programs can be measured |
| How it runs | Each entry point that can be called from outside is run once, with the fields left at their default values. For the same program, pressing it again gives the same numbers |
| The editor while it runs | You can keep using it. Only the browser page waits for the result |
| Entry points that did not run | No number is shown; they read did not run. This is kept distinct from a count of 0 |
| What the numbers cover | The calls made on the path taken with default values. They are not the counts from actually playing |