# 观察 Spring HTTP 请求的响应时间
watch org.springframework.web.servlet.DispatcherServlet doService '{params[0].getRequestURI()+" "+ #cost}' -n 5 -x 3 '#cost>1'
# 观察 Spring 响应头信息
watch org.springframework.web.servlet.DispatcherServlet doService '{params[0].getRequestURI()+" header="+params[1].getHeaders("trace-id")}' -n 10 -x 3 -f
# 观察 MyBatis SQL
watch org.apache.ibatis.mapping.BoundSql getSql '{params,returnObj,target.parameterObject,throwExp}' -n 5 -x 3
# JDBC
watch java.sql.Connection prepareStatement '{params,throwExp}' -n 5 -x 3 'clazz.getName().startsWith("com.mysql") and params.length==1' and #cost>1
watch java.sql.Connection prepareStatement '{params,throwExp}' -n 5 -x 3
tt -t org.springframework.data.redis.connection.jedis.JedisConnectionFactory getConnection
tt -t org.springframework.data.redis.cache.DefaultRedisCacheWriter get
# Controller 方法内不慢,但整体慢时,排查请求方法前的逻辑
# getMethodArgumentValues 慢说明注解校验问题
# doInvoke 慢说明是方法慢
trace org.springframework.web.method.support.InvocableHandlerMethod invokeForRequest