Tracking Client performance

From m204wiki
Revision as of 21:25, 25 May 2023 by Ekern (talk | contribs) (Created page with "<span class="f_Para">Programs with thousands of lines of code can introduce a slight delay while the Debugger Client reads, parses, and displays the code in the </span><var>So...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Programs with thousands of lines of code can introduce a slight delay while the Debugger Client reads, parses, and displays the code in the Source Code tab. As an aid to program tuning, you can have the Client log the time it spends processing program code. For example, you can isolate the elapsed time between the arrival of program code on the workstation and its display in the Source Code tab, ready for debugging.

To send code handling data to the Client log file (log.txt), you add an entry to the Client configuration file (debuggerConfig.xml). This file is installed in the same directory as the Debugger Client executable file, and it is initially configured as part of the Debugger Client installation.

To update the file:

  1. Open the debuggerConfig.xml file in a text editor.
  2. Add a <collectTuningData/> element at the same level (as a sibling of) the existing <serverList> element.
When complete, your configuration file should have a structure like the following:

<debuggerConfig version="1.0">
   <serverList>
       .
       .
       .
   </serverList>
   <proxy>
       .
       .
       .
   </proxy>
       .
       .
       .
   <collectTuningData/>
</debuggerConfig> 

3. Save and close the file; then restart the Debugger Client.

After each subsequent Client interaction with the Online, the log.txt file will contain blocks of time-stamped lines like the following (the data is sent in XML documents, as described in Debugging the Janus Debugger and in Debugging the TN3270 Debugger):

2008 10 03 10:07:20    Receive: read XML begin 
2008 10 03 10:07:20    Receive: read XML end, bytes read=1819 
2008 10 03 10:07:20    Receive: parse XML begin 
2008 10 03 10:07:20    Receive: parse XML end 
2008 10 03 10:07:20    Receive: process XML begin 
2008 10 03 10:07:20    Incoming program state: S Prior state: I 
2008 10 03 10:07:21    Receive: process XML end 
2008 10 03 10:07:21    UI: load source begin 
2008 10 03 10:07:21    UI: load source end 

The last two sample lines above are recorded only when a new program is sent to the Client. Otherwise, all Client GUI commands provoke an XML message exchange between the Client and the Debugger Server that is reflected in a block of single pairs each of read, parse, and process lines.