Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Benefits:
Analysis of SQL WHERE clause of SELECT, UPDATE and DELETE statements. Identifies select statements that do not handle sy-subrc return codes Use of statements that infer ominous database access Identifies statements that bypass buffering Drill through support from results screen to program source statement. Etc.
Disadvantages:
Static checks cannot identify the relevancy of a piece of code Cannot determine the frequency of execution of a statement of code.
Benefits:
Comprehensive tools set for evaluation of SQL statements Integrated tools for accessing DDIC information
Disadvantages:
Dynamic analysis requires equivalent production data content Limited to database access analysis, no evaluation of code path execution
Benefits:
Quickly identifies the percentage of time spent in database in contrast to abap code execution. Evaluation of modularization units, modules, performs, functions, etc. Analyze internal table operations
Disadvantage:
Dynamic analysis requires equivalent production data content Lacks the integration of comprehensive SQL analysis tools
Code Inspector
Standard Checks Performed Syntax checks and program generation
Normal ABAP syntax check
Program Generation
Security checks
Use of statements deemed critical
Code Inspector
Standard Checks Performed (continued) Performance checks
Select statements that implicitly bypass SAP table buffers
Search operations
Search for single tokens
Search for complete statements Sophisticated static program checks should be part of each development process.
Code Inspector
Access directly from the Abap Editor, from SE38 or SE80
Code Inspector
Extended Performance Program Checks Checks Error Warnings Informational Errors: Errors: No Table EXCEPTION VEPO no field to set from SY-SUBRC Table Index in Declared WHERE for CALL condition FUNCTION.
Evaluate tothe remove sy-subrc condition or 1. Can format of where clause possibly warrants the review of the function be changed to use an index module for modification.
31
16
2. Create an index to support This line contains a BREAK-POINT where condition if warranted. statement. Warnings: All break points should be removed from
code unless specific reasons Tableproduction KNMT: No First Field from Table warrant their use. Index in WHERE condition Dangerous use of TRANSLATE in a Further analysis may be multilingual system. required to determine if this is a Evaluate to determine if this analysis will have an problem. Dynamic that impact when we implement other languages. determines frequency of execution can be used to determine impact of the warning.
Performance Trace
Transaction ST05
Used to analyze and fine-tune programs database access Dynamic analysis Must be logged into processor where job is running that is subject to the trace. Should pre-load the application before trace is started. Should strive to use this trace in QA unless production problem cannot be recreated.
Performance Trace
Activate Activate Trace Trace with Use to start the trace in your Filter
current dialog process. Used start the trace Once to activated you may exit against another process. the transaction and run the User name Useful to start program that you wish to a trace trace.another users dialog session. Transaction Further limits bounder of trace to a tcode. Process ID Used to activate trace against a batch process.
Performance Trace
Display Trace
Performance Trace
Is program using calculations and summations that can be done on the database via SUM, AVG, MIN or MAX functions of SELECT?
Use the calculations available on the SELECT statement.
Performance Trace
Tips for Running Trace
Limit the duration of the trace to 10 minutes or less Preload the program once to initialize database and cursor buffers To access trace results later
Save the trace or.. Record stop and start time of trace
Utilize trace SQL statement summary function 5,000ms access per execution, general rule of thumb Make note of the appserver of the job you are tracing Only ONE trace can be active on an appserver.
Runtime Analysis
Transaction SE30
Excessive or unnecessary use of modularization units CPU intensive program functions Inefficient or redundant database access
Three phases of the ABAP runtime analysis. 1. Setting limits for the data that is measured 2. Measuring the data 3. Analyzing the data.
Runtime Analysis
SAP Menu Test Runtime analysis
Initial Screen
Measurement restrictions
Transaction Program Function
Current Session
Parallel Session
List Viewer
Dep. On aggregation
Hit Lists
ABC analysis
Call hierarchy
Statistics
ABAP Dictionary
Tables
ABAP Editor
Runtime Analysis
Initial Screen
Runtime Analysis
Variant: Statements Filter
Runtime Analysis
Variant: Duration and Type
Runtime Analysis
Measurement Overview Abap interpreter Database System Statements
Green bar indicates less that 50% of the total runtime. Database bar will be red when more than 25% runtime.
Runtime Analysis
Database Table Hit List shows table names number of
accesses , table type and buffering mode sorted by access time.
Runtime Analysis
Group Hit List
Individual call instructions grouped by categories. Indicates the gross runtime and the number of times executed.
Runtime Analysis
Internal Table Hit List
List of all internal table accesses. Shows the number of accesses, the gross and net time required and the total memory consumed.
Runtime Analysis
Call Hierarchy
Shows the chronological sequence of analyzed objects, the gross and net time taken at each call level.
Runtime Analysis
Statistics
Program Load Size Global data def. Program name Memory occupied by the program when loaded (in bytes) Memory occupied by the global data of the program when loaded (in bytes)
Defined methods
Called methods Defined forms Called forms Called F. modules RFC call.
Summary
Always perform static source evaluation Do not leave a trace running for an extended period of time, consume system resources You must be logged in to the same appserver as the process you are tracing. Powerful set of analysis tools With power and the freedom to use them comes responsibility
Questions?