[fpc-pascal] How to find where my app consumes CPU?

Bo Berglund bo.berglund at gmail.com
Wed May 19 21:13:25 CEST 2021


On Wed, 19 May 2021 19:42:27 +0200, Florian Klämpfl via fpc-pascal
<fpc-pascal at lists.freepascal.org> wrote:

>Even it’s a service, running it with gprof enabled should be possible, no?

I do not know what you mean, but the program is installed as a service but it is
essentially a normal console application with no GUI parts.
The reason it is run as a service is that it must run 24/7 on the target machine
so this is how I am testing it too. But initially I always tested it by starting
it in a terminal (actually a PuTTY SSH session from my Windows PC).

Googling gave me this:
https://www.freepascal.org/docs-html/user/userse56.html
and this: https://wiki.freepascal.org/Profiling

I have checked that gprof is found on path on the development machine, but I
have never ever heard of it let alone use it.
But if it is able to find out where the cycles are spent, then very good!

Seems like there is a bit of read-up to do...

Thanks for the suggestion, btw!


-- 
Bo Berglund
Developer in Sweden



More information about the fpc-pascal mailing list