添加专门用于监控Sql语句执行耗时的命令SqlProfilerCommand,输出内容示例:
ts=2021-08-24 14:21:07; [method=com.zaxxer.hikari.pool.HikariProxyStatement.executeQuery] [cost=0.351708ms] sql: select from org_user args: ts=2021-08-24 14:21:07; [method=com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery] [cost=0.383291ms] sql: select from org_user where age <= ? args: 18 ts=2021-08-24 14:21:07; [method=com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate] [cost=0.608084ms] sql: update org_user set age = age + ? args: 1 ts=2021-08-24 14:21:07; [method=com.zaxxer.hikari.pool.HikariProxyStatement.executeBatch] [cost=1.108833ms] sql: update org_user set age = age + 1;update org_user set age = age - 1 args: ts=2021-08-24 14:21:07; [method=com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeBatch] [cost=1.482834ms] sql: update org_user set age = age + ? args: --(10) --(20)