In CitraTest run via Foglight Transaction Recorder (FTR), a Timer, using StartTimer and StopTimer, can be set. If one timer is started and a second one is is then started and stopped before the first one is stopped, the first (outer) timer does not report any time when run from Foglight Transaction Recorder. CitraTest does, however, correctly report time when run directly within the Citratest UI.
FTR only allows one timer to be active at a time. The first thing that StartTimer appears to do is call StopTimer on any active timer. The limitation of only allowing one active timer at a time was by design in FTR, in turn, due to limitation in Foglight in regards to use of nested timers.
CitraTest calls into the FTR.Timer.DLL to start and stop timers, create Transactions, and any other interaction with FTR. The two programs (Citratest and FTR) keep separate timers. FTR does NOT parse any CitraTest logs (for anything).
This is tracked as issue APMDATA-1898: "Foglight Transaction Recorder does not support nested timers implemented in a CitraTest Script".
Also, to explicitly warn users about this limitation , we have logged documentation improvement issue APMDATA-1933: “Spell out in the "Foglight Transaction Recorder Getting Started Guide that FTR cannot support nested timers implemented in CitraTest script"
Issue APMDATA-1898 is a design limitation and cannot be changed. There is a partial workaround, however (see below).
To resolve the documentation issue, APMDATA-1933, the next version (5.6.10) the 'Foglight Transaction Recorder Getting Strated Guide', section 'Instrumenting Tevron Citratest' warns the reader not to use nested timers and give a partial workaround.
Doing that will make it show up as a separate instruction in the dashboard. And the user will be able to see how long that instruction took to run, and the main Timer block will also correctly include that time.
NOTE: Foglight Transaction Recorder does not support nested timers implemented in a CitraTest script. Therefore, we do not recommend this usage. However, you can embed FTR timers in a CitraTest script if this scenario is really required. This will result in a separate instruction in an FTR script.
The following is a example of an FTR timer embedded in a CitraTest script: