Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
Hello, Some time ago I discovered that the CMM2 has a built-in profiler, which you can activate by typing "option profiling on" at the basic prompt.
I found this feature quite facinating so I tried to use it to optimize my games. Unfortunately the CSV output is not really human friendly and the advice from the manual to use Excel for the analysis is quite time consuming.
Therefore I wrote a small tool in Java (running on Windows and Linux) called CMM2Profiler, that makes life a bit easier here.
You can load a profiler log and do some basic analaysis. Screenshot below.
The source code is on GitHub but for all who don't want to compile the java code, I put a precompiled version in the GitHub Wiki: https://github.com/grimm-git/CMM2Profiler/wiki.
The archive contains two start scripts: - bin/app for Linux and - bin/app.bat for Windows
The only thing you have to add is a Java JRE 17 or above.
Best Regards Matthias Edited 2024-04-10 03:02 by joker
PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 105
Posted: 07:50am 10 Apr 2024
Copy link to clipboard
Print this post
Sorry, but I don't want to die stupid. What is this feature used for? I haven't heard of it yet.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10637
Posted: 08:09am 10 Apr 2024
Copy link to clipboard
Print this post
It tells you how many times a specific Basic line is executed and how much CPU time that line uses. This allows you to tune performance of the application. Unfortunately, the mechanism uses a lot of memory so can't be copied to the PicoMite (before anyone asks )
PilotPirx Senior Member Joined: 03/11/2020 Location: GermanyPosts: 105
Posted: 08:32am 10 Apr 2024
Copy link to clipboard
Print this post
Thx, nice feature. When I retire and write my first big program for the CMM2, I'll test it out (and the java tool).
toml_12953 Guru Joined: 13/02/2015 Location: United StatesPosts: 495
Posted: 08:52am 10 Apr 2024
Copy link to clipboard
Print this post
Thank you for a very useful utility!
Might I suggest giving the user the ability to sort on the different columns? I know I'd like to see the last column (Calls x Time) in decreasing order so I could determine the biggest "offenders" at a glance.