Try OpenEdge Now
skip to main content
Debugging and Troubleshooting
Troubleshooting Resources : Other Diagnostics Resources : Run-time diagnostics : Collecting r-code usage statistics
 
Collecting r-code usage statistics
When you use statistics startup parameters, OpenEdge writes statistics at the end of the session. You can use the SHOW-STATS statement in concert with the startup parameters to write statistics at specific times during execution. The statistics collected with the SHOW-STATS statement do not include the report of all startup parameters and their values that you get with the Statistics (-y) startup parameter.
Statistics-gathering mechanisms include these various startup parameters:
*Statistics ( -y ) — Use this startup parameter to collect procedure access and usage statistics throughout the OpenEdge session. This parameter also sends a report of all startup parameters and their values to the output file.
*Statistics with CTRL-C ( -yc ) — When you use this startup parameter, press CTRL-C rather than using the SHOW-STATS statement to control when to collect statistics during execution.
*Segment Statistics ( -yd ) — Use this startup parameter to write segment statistics, such as the number of segments and their total size, to the output file.
*Statistics with Cross-reference ( -yx ) — Use this startup parameter to collect procedure call statistics.
The following example shows the -y startup parameter statistics generated on execution of execlog.p. (See Run-timediagnostics for sample code of execlog.p.)

Sample -y startup parameter statistics

Fri Aug 22 09:19:19 2003

Progress Startup Parameters:

-pf C:\Progress\OpenEdge\startup.pf,-cpinternal ISO8859-1,-cpstream
ISO8859-1,-cpcoll Basic,-cpcase Basic,-d mdy,-numsep 44,-numdec 46,
(end .pf),-db sports,-1,-y

Progress client startup options:

-A = 0 | -d = mdy | -D = 100 | -h = 7
-hs = 0 | -Mpte = 0 | -Mxs= -1 | -nb = 90 | -Nb =0
-NL = 0 | -o = printer| -p = (null)
-q = 0 | -Q = 0 | -s = 40 | -T =
-t = 1 | -TB = 8 | -TM = 8 | -yy = 1950 | -25 = 0
DataServer startup options:

-nojoinbysqldb = 0
-SQLlogging = 0
-noSQLbyserver = 0
-noindexhint = 0

Database: sports

-1 = 1 | -a = (null)
-B = 100 | -c = 20 | -cl = 0 | -cp = (null)
-cs = 8 | -da = 0 | -db sports
-dt = (null)| -g = (null)
-H = (null)| -i = 1 | -I = 25 | -L = 8192 | -ld = sports
-Ma = 0 | -Mf = 0 | -Mi = 1 | -Mm = 1024 | -Mn = 5
-Mr = 1012 | -n = 1 | -N = | -O = -1 | -R = 1
-RO = 0 | -S = (null)

Execution buffer map: 09:19:32
Size Name
---- ----
2250 adecomm/_pwwinst.r
9798 adecomm/_pwexit.r
3232 adecomm/_kvlist.r
1867 adecomm/_uniqfil.r
1837 adecomm/_wfrun.r
8639 adecomm/_toollic.r
34355 adecomm/_runcode.r
2202 adecomm/_osprefx.r
7589 adecomm/_mnkvals.r
982 adecomm/_osfext.r
7033 _login.r
1496 adecomm/_locard.r
3249 adecomm/_valpnam.r
99081 adeuib/_uibinfo.r
11991 adecomm/_adeload.r
6992 adecomm/_adehelp.r
1330 execlog2.p
    3431 C:\Solen\100a\p73584_execlog.ped
10846 adecomm/_getfile.r
12425 _prostar.r
   4637 _edit.r
17850 adeedit/_dlggetf.r
1476 adecomm/_tmpfile.r
311125 adeedit/_proedit.r
4255 adecomm/_ossfnam.r
1506 adecomm/_locdwb.r
778 adecomm/_setcurs.r
3727 adecomm/_adeevnt.r
Program access statistics: Times Bytes
Reads from temp file: 0 0
Writes to temp file: 0 0
Loads of .r programs: 26 571218
Saves of compilation .r's: 0 0
Compilations of .p's: 2 4761
Checks of files with stat: 107 0
Memory usage summary: Current Max Used Limit (Bytes)
Stack usage (-s): 60 40944 40960
Local buffer usage: 1952 30016
R-code Execution Buffer: 514984 514984 3170304

Segment Descriptors Usage: (numbers)
Max Used: 288        Limit: 480
------------------------------------------------
Note: The database statistics appear because the startup parameter connects to a database (-db sports , -1).

Sample r-code segment statistics

The following example shows the -yd r-code segment statistics generated on execution of execlog.p. (See Run-timediagnostics for sample code of execlog.p.)
Per procedure temp file access statistics:
Segment Read/Write Times Bytes
------- ---------- ----- -----
execlog.p
execlog2.p
Per procedure segment information
---------------------------------
File Segment #Segments Total-Size
---- ------- --------- ----------
execlog.p
Initial 1 424
A-Code: 1 1 836
E-Code: 1 1 160
Debugger 1 180
Int-Proc: 1 1 256
Frame: 1 1 460
Frame: 2 1 400
Frame: 3 1 400
Text: 1 1 175

execlog2.p
Initial 1 280
A-Code: 1 1 320
E-Code: 1 1 144
Debugger 1 88
Frame: 1 1 400
Text: 1 1 38
------------------------------------------------

Sample procedure call statistics

The following example shows the -yx statistics generated on execution of execlog.p. (See Run-timediagnostics for sample code of execlog.p.)
Thu Jan 03 15:21:40 2002
Procedure call statistics: 15:21:42
Caller Callee Load Size Calls Rd Bytes Reread Time
<top> execlog 3291 1 0 0 1953
execlog execlog2 1270 1 0 0 16
For detailed information on statistics startup parameters, see OpenEdge Deployment: Startup Command and Parameter Reference. For a description of the SHOW-STATS statement, see OpenEdge Development: ABL Reference.