Hello,
i have written a singleton class for measuring the runtime of different parts of our programs.
It gets timestamps before and after some routines, calculates the runtimes and logs the results in a DB table.
My problem is: if someone would debug these parts of coding, the calculated runtime would be by far way longer then the real runtime, since the program has to wait for the developer.
Now i would need a way to find out if the DEBUG mode is on, so i can avoid these wrong results to be loged.
I already tried using the structure 'ABDBG', using it like shown in the following piece of code:
TABLES: abdbg.
IF abdbg-syrepid IS NOT INITIAL.
" DEBUG mode is on !
ENDIF.
Unfortunately this doesn't work for me because of 2 reasons:
- the "TABLES" declaration cannot be used in classes
- even if i use this coding in a Test-Report, the structure 'ABDBG' is existent but INITIAL.
Anyone can give me some ideas for solving this problem?
Thank you in advance for any hints.
With best regards