[ASM] Bytecode operation converts existing class to record method running time

insert image description here

1 Overview

Previous article: [ASM] Bytecode Operation Converts Existing Class Printing Method Parameters and Return Values ​​We have learned how to obtain method parameters and print them flexibly.

This chapter is mainly to record the method running time. The change operation is also to do some operations when the method enters and exits.

2. Run time

Suppose there are classes as follows

/**
 * 主要是获取方法运行时间
 */
public class GetMethodRuntime {
   
    
    

    public int add(int a, int b) 

Guess you like

Origin blog.csdn.net/qq_21383435/article/details/125034203