首页 > 其他分享 >Single Transaction Analysis (ST12) getting started

Single Transaction Analysis (ST12) getting started

时间:2022-09-30 23:40:37浏览次数:83  
标签:Transaction trace figure getting started see ABAP program ST12

货铺QQ群号:834508274


he Single Transaction Analysis was developed to promote the usage of ABAP trace inside SAP Support. It integrates the ABAP- (SE30) and the Performance (ST05) Trace into one transaction. This blog will show how to take a trace with ST12 in the so called “Current Mode” scenario. Further options for performning traces and analysis will be presented in future blogs.

Before you start:

ST12 is delivered as a part of the Service tools for Applications (ST-A/PI). SAP note 69455 describes how to get the latest version of the ST-A/PI. Note that the ST12 transaction is not officially documented / supported and only available in the English language. Although it is mainly intended for use by SAP or certified service consultants during SAP Service Sessions, you can use it for you own performance analysis. A description of ST12 is given in SAP note 755977 (ST12 “ABAP Trace for SAP EarlyWatch/GoingLive”).

ST12 main Screen:

The main screen of ST12 has three main parts as shown on figure 1.

Single Transaction Analysis (ST12)  getting started_lua

Figure 1: main screen

Using ST12 with Current Mode:

In the “Current Mode” Scenario you are going to trace the execution of a program or transaction. Before you trace, it is recommended to execute your program or transaction several times to fill the buffer and caches, as filling the buffers and caches is something that can’t be optimized with ABAP or SQL tuning. Before you can start the trace you have to define the measurement scope. In ST12 this is done “on the fly”, no measurement variants are saved. After starting ST12 and clicking on “Current Mode” (see nr. 1 in figure 1) you will see a screen like figure 2.

Single Transaction Analysis (ST12)  getting started_sql_02

Figure 2: Current Mode

You can enter a comment to give a meaningful description for the trace. Enter your program or transaction in the corresponding field and set the appropriate radio button, see nr. 2 in figure 2. In the lower part of the screen you define the measurement scope. The left part is for the ABAP trace (SE30) and the right part for the Performance Trace (ST05), see nr. 3 in figure 2.

Note: Since ST12 uses the functionality of both transactions (SE30 and ST05) the options are similar or the same. ST12 hides some details to make the traces more easy to use.

For the ABAP trace the most important decision is if you want to trace “with internal tables”. It is recommended to switch this setting on. Other options like Particular units, Filters or “Further opt.” are only needed in exceptional cases and beyond the scope of this “getting started” blog.

If you click on “Further opt.” (see nr. 4 in figure 2) the following screen pops up:

Single Transaction Analysis (ST12)  getting started_sql_03

Figure 3: further Options

Increase the “Max. size of file” to 20 MB (see nr. 5 in figure 3) and the “Max. trace runtime” to 3600 seconds (see nr. 6 in figure 3) if you have long running programs. The aggregation is set to “by calling position” by default which is the recommended option. All other options only have to be changed in exceptional cases. For example, if you get strange or negative times in the ABAP traces, you should use the low resolution clock.

For the performance trace you can decide whether you want to take the SQL-, Enqueue- and / or RFC trace. In the above scenario only the SQL Trace is switched on. The SQL Trace is the most important performance trace.

This is all you have to do. You can start your program or transaction now by clicking “Execute / start trace” (see nr. 7 in figure 2). After your program or transaction has finished and you have returned to ST12 you will see your trace in the lower part of the screen.

The status column (see nr. 8 in figure 4) shows you whether your trace is ready for eval(e.g. time limit exceeded, file size to small, …). The green tick shows that the ABAP trace has been successfully imported to the database.

Note that ST12 imports the ABAP trace files into the database, in order to make them available in the whole system and keeps them for later analysis. In SE30 the trace files are application server specific and deleted after a certain number of days. The performance trace is not imported by ST12 and therefore is only available until the trace files are overwritten.

To eval(see left arrow in figure 4) in order to display the imported ABAP trace. The list on figure 3 has been sorted descending by the Net column. This means the total times for each calling position is displayed in descending order.

In order to eval(ST05) – Quick and Easy Blog (The SQL Trace (ST05) – Quick and Easy) for further details on ST05 analysis.

Single Transaction Analysis (ST12)  getting started_sql_04

Figure 4: Trace Analysis

Summary:

In order to take an ABAP and SQL Trace at the same time for a program you are going to execute the following steps:

  • 1.) Call ST12, click on CURRENT MODE (Nr. 1 in figure 1)
  • 2.) Fill in the program or transaction and a meaningful comment (Nr. 2 in figure 2)
  • 3.) Define the measurement variant:
  • a. switch on ABAP and SQL Trace and use internal tables (Nr. 3 in figure 3)
  • b. increase the file size and the duration (Nr. 4 in figure 2 and Nr. 5 and 6 in figure 3)
  • 4.) Execute your program (Nr. 7 in figure 2)
  • 5.) Evaluate the trace (figure 5)

This blog demonstrated how ST12 combines the ABAP and Performance trace and how easy it is to trace a program and measure both ABAP and SQL execution. Future blogs will show advanced topics for trace taking and analysis.

More information on ST12 can be found here:

ST12 WIKI:

​http://wiki.sdn.sap.com/wiki/display/ABAP/Single+Transaction+Analysis​

Blogs:

ST12 – The workprocess trace

Books:

​http://www.sap-press.com/product.cfm?account=&product=H3060​

​http://www.sap-press.de/1821​



标签:Transaction,trace,figure,getting,started,see,ABAP,program,ST12
From: https://blog.51cto.com/u_15680210/5727541

相关文章

  • UI动画 - CATransaction
    前言1-CAAnimation并不是一个单纯的实现动画的框架,它原本叫LayerKit。管理着树状结构的图层数据,并快速组合这些图层,最终构成了一切可视化的基础2-在构建可视化,也......
  • 了解Pytorch|Get Started with PyTorch
    一个开源的机器学习框架,加速了从研究原型到生产部署的路径。!pipinstalltorch-ihttps://pypi.tuna.tsinghua.edu.cn/simpleimporttorchimportnumpyasnpBasics......
  • Get started with NuGet packages in Azure Artifacts
    GetstartedwithNuGetpackagesinAzureArtifactsDownloadNuGetpackages1.Getthefeed'ssourceURLFromwithinyourproject,selectArtifacts,andthen......
  • SpringBoot项目为什么不需要添加@EnableTransactionManagement了
    SpringBoot项目为什么不需要添加@EnableTransactionManagement了1、前言我在刚开始搭建springBoot项目的时候,看见其他人在启动类上面使用了@EnableTransactionManagement......
  • 美团一面:@Transactional 原理和常见的坑?
    大家好,我是楼仔!Java后端面试的时候,面试官经常会问到@Transactional的原理,以及容易踩的坑,之前一面百度,就遇到过,今天就带大家把这几块知识吃透。这篇文章,会先讲述@Tran......
  • 面试突击85:为什么事务@Transactional会失效?
    导致@Transactional失效的常见场景有以下5个:非public修饰的方法;timeout超时时间设置过小;代码中使用try/catch处理异常;调用类内部的@Transactional方法;数......
  • 为什么阿里规定需要在事务注解@Transactional中指定rollbackFor?
    阿里巴巴Java规范:方法【edit】需要在Transactional注解指定rollbackFor或者在方法中显示的rollback。异常的分类Throwable:有两个重要的子类:Exception(异常)和Error(错......
  • Minimum Money Required Before Transactions
    MinimumMoneyRequiredBeforeTransactionsYouaregivena0-indexed2Dintegerarray transactions ,where transactions[i]=[costi,cashbacki] .Thearray......
  • SQLServer第八章:事务 transaction
    事务:是一种机制,独立的工作单元,保证结果只产生成功或失败特性(ACID): 原子性:要么成功,要么失败 一致性:操作前后表中数据是一致的 隔离性:当前事务操作的数据,对......
  • Go 学习(一) : Get started with Go
    安装gohttps://go.dev/doc/install安装以后命令行执行goversion然后随便创建一个文件,比如hello.gopackagemainimport"fmt"funcmain(){ fmt.Printl......