Professional Documents
Culture Documents
SAP AG
Chapter 14 Objectives
SAP AG
Performance Measurement
Runtim
Runtimee analysis
Runtime analysis
SAP AG
The runtime analysis function allows you to analyze your ABAP/4 program.
The most important information supplied is the amount of CPU time consumed. You do not have to
change source code of the program to determine this.
Using the GET RUN TIME statement, you can measure the CPU time consumed by statement
sequences of your choice. Here, you change the source code by inserting the statement as required.
Using the SQL Trace function, you can log and analyze database operations for an individual user or
the entire system (see Appendix).
Runtime Analysis
Runtim
Runtimee analysis
analysis
start end
m
measure
easure analyze
analyze
Transaction
Transaction or
or Report
Report
Dialog List
Analysis
SAP AG
The runtime analysis function allows you to analyze the performance of any transaction or program
created in the ABAP/4 Development Workbench. The system stores the result of the measurement in a
performance data file.
You have to set certain system parameters (directory and information about the size of the memory
area) before you can store the results of the analysis. For further information, please refer to Using
Trace Facilities in the documentation BC - System Services.
The runtime analysis function is described in the manual ABAP/4 Workbench Tools.
List of Measurable Components I
Modularization
Modularization units
units
ABAP/4
ABAP/4 program
program PROG
PROGRAM/REPORT
RAM/REPORT
M
Module
odule (screens)
(screens) M
MODULE
ODULE
Subroutine
Subroutine FO RM
Function
Function m
module
odule FUNCTION
FUNCTION
Dialog
Dialog m
module
odule CALL
CALL DIALOG
DIALOG
Transaction
Transaction call
call CALL
CALL TRANSACTION
TRANSACTION
Start
Start report
report SUBM
SUBMIT
IT
SAP AG
Runtime analysis measures ABAP/4 statements and processing operations which may sometimes be
expensive in terms of CPU time.
List of Measurable Components II
Database/file
Database/file accesses
accesses
O SELECT;
SELECT; INSERT;
INSERT;
Open
pen SQL
SQL UUPDATE;
PDA TE; DELETE
DELETE
DDirect
irect SQL
SQL interface
interface EXEC SQL
EXEC SQL
DData
ata clusters
clusters EXPORT
EXPO RT // IMPOR
IMPORTT
Sequential
Sequential files
files TRANSFER
TRAN SFER // READ
READ DA
DATA
TASET
SET
Internal tables
Exte
Extend
nd AAPPEND
PPEND // CCOLLEC
OLLECTT
Process
Process LOO
LOOPP
Sort
Sort SORT
SORT
System
System performance
performance
Load
Load // generate
generate program
program
SAP AG
Runtime Analysis: Initial Screen
Transaction
Program Execute
Options Restriction to
Function module
W ith subroutines
W ith internal tables All
Perform. files...
SAP AG
You can restrict the scope of the logging here, but not the scope of the measurement. The processing
times for unselected components are always added to the gross time of the superior modularization
unit.
Restriction to
If you choose Function module here, you restrict the analysis to a particular function module in your
program.
Execute
This starts the specified program and measures its processing steps.
The results of each measurement are stored in a separate file which, by default, is kept for 8 days or
deleted if storage space is required for new files. You can use the Perform. files function to display a
list of existing files, sorted by various selection criteria.
Displaying Performance Data
Overview
SAP AG
When the program has been executed, you can analyze the results. To do this, you choose the Analyze
function.
The analysis starts with an overview display in the form of a bar chart. This shows you how the total
processing time is distributed across the ABAP/4, database, and R/3 System levels.
From this overview screen, you can branch to several different options:
--> Hit list
--> Tables
--> Group hit list
--> Hierarchy
Even at these levels, you can branch further. The subsequent displays depend where a particular
selection was made and what line type was relevant.
You can generate analyses for any modularization unit.
Gross/Net Times
PROGRAM RSDEMO00.
.
.
.
SELECT
.
.
.
PERFORM
.
.
SORT
.
.
.
.
.
.
gross net
SAP AG
GET
GET RUN
RUN TIME
TIME FIELD
FIELD <f>.
<f>.
PROGRAM RSAAA14A.
DATA: T1 TYPE I,
T2 TYPE I,
RUN_TIME TYPE I.
SAP AG
When GET RUN TIME is first called, the field <f> is initialized. On each subsequent call, the field
<f> contains the amount of CPU time (in microseconds) since the first call.
Since the results of a measurement depend on the system load at any given time, they may vary.
Further time differences can occur, for example, if a data record is read from the buffer one time, but
from the database another time.
Chapter 14 Summ ary
SAP AG BC400 / 14 - 1