Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 20:35 25 Nov 2024 Privacy Policy
Jump to

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.

Forum Index : Microcontroller and PC projects : CMM2 Profiler

Author Message
joker
Newbie

Joined: 06/02/2024
Location: Germany
Posts: 25
Posted: 05:01pm 09 Apr 2024
Copy link to clipboard 
Print this post

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

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 68
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 Kingdom
Posts: 9111
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

Regular Member

Joined: 03/11/2020
Location: Germany
Posts: 68
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 States
Posts: 339
Posted: 08:52am 10 Apr 2024
Copy link to clipboard 
Print this post

  joker said  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.

Best Regards
 Matthias


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.
 
joker
Newbie

Joined: 06/02/2024
Location: Germany
Posts: 25
Posted: 07:33pm 11 Apr 2024
Copy link to clipboard 
Print this post

Yes, you might  
But it is already built in.
Just click on the column headers until you get the sort order you prefer.

Best Regards
 Matthias
 
LeoNicolas

Guru

Joined: 07/10/2020
Location: Canada
Posts: 479
Posted: 11:58pm 12 Apr 2024
Copy link to clipboard 
Print this post

This is something I will really use for optimize Knightmare
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024