本文共 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 usualAnd 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:Run the report, it will execute the methods for you and display duration of each method execution ( unit: microsecond )
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 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!