GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing makecode.com — Profiling performance Profiling performanceThe performance counters are a generic PXT feature, but are currently mostly used in MakeCode Arcade.
To enable profiling of a given function, you need to call To enable instrumentation append Now, run your code and look at JavaScript console. You should see output similar to this every second: All times are given in microseconds (us). The first column is the name of the performance counter.
Then come the global stats since the beginning of the run - for each perf counter
you can see total time spent in it, how many times it was entered
and how long on average per entry.
The next set of numbers is similar, but only contains data since last perf counter
output.
After Typical timing procedure is to:
Profiling on hardwareIt's currently only supported on STM32F4.
You enable it with There will be no automatic dumping of profile counters, but you can use Profiling memoryYou can track live objects in the heap, when running in the simulator.
You do it with You can also trigger it between game levels, or in some other well-defined points. Each call creates a heap snapshot. For every snapshots it prints number of live objects of each type, the biggest 20 objects, and new objects. New objects are only identified after the third snapshot has been taken.
Given three snapshots S0, S1, S2, a new object is one which was not present
in S0, but is present in both S1 and S2.
Additionally, if there is no more than The profiler doesn't currently track strings and numbers. Also, the memory reported for arrays is a low bound (the memory allocated is larger due to growth factor of arrays). Finally, on hardware heap fragmentation might mean less memory is available than one would think. Profiling on hardwareYou can use The GC has run 146 times since reset. It has allocated 1 chunk of memory (this is typically 1 or 2), with a total size (of all chunks is more than 1) of 87712 bytes. Upon last collection, there were 34976 free bytes and the biggest contiguous block was 25092 bytes (this is the largest allocation that would still succeed right after that last collection). Since reset, the minimum free memory was 32328 (which means that if the device had 32k less memory it would crash). Profiling executable sizeThis can be enabled with The switch will also generate a long comment at the head of |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |