一个SAP应用的性能比较工具
发布日期:2021-06-30 14:03:29 浏览次数:2 分类:技术文章

本文共 1565 字,大约阅读时间需要 5 分钟。

In order to avoid unnecessary repeated routine code to measure performance such as below:

" get timestamp1
" run the method whose performance you want to measure
" get timestamp2
" duration = timestamp2 - timestamp1
I write this small tool in ER9/001.

An example of performance comparison requirement

Suppose I have written a class ZCL_CRM_CODEPLOY_DATA_TOOL which has two methods:

(1) SELECT_FROM_CDS_VIEW: read data from table ZCOMM_PRODUCT, which is redirected to a CDS view

(2) SELECT_FROM_ZCOMM_PRODUCT2: read data from table ZCOMM_PRODUCT2 as usual
In order to avoid unnecessary repeated routine code to measure performance such as below:
" get timestamp1
" run the method whose performance you want to measure
" get timestamp2
" duration = timestamp2 - timestamp1
I write this small tool in ER9/001.

How to use it

Suppose I have written a class ZCL_CRM_CODEPLOY_DATA_TOOL which has two methods:

(1) SELECT_FROM_CDS_VIEW: read data from table ZCOMM_PRODUCT, which is redirected to a CDS view

(2) SELECT_FROM_ZCOMM_PRODUCT2: read data from table ZCOMM_PRODUCT2 as usual

clipboard1

And I would like to compare the performance of these two approaches.

Now I do not need to write routine code to execute the method and measure the performance. Instead just run report ZCO_PERFORMANCE_TEST in ER9/001:

clipboard2

Run the report, it will execute the methods for you and display duration of each method execution ( unit: microsecond )

clipboard3

In case you are interested with tool implementation, look into source code of class zcl_crm_codeploy_performance in ER9/001.

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

公众号截图

转载地址:https://jerry.blog.csdn.net/article/details/103571572 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:SAP CDS重定向视图和直接读这两者场景的性能比较
下一篇:使用代码获得Hybris Commerce里显示的产品图片

发表评论

最新留言

表示我来过!
[***.240.166.169]2024年04月15日 09时14分25秒