update docs

This commit is contained in:
huoyo 2023-04-08 15:33:35 +08:00
parent 8bb5adb21f
commit 110faff302
3 changed files with 21 additions and 17 deletions

View File

@ -4,20 +4,21 @@
<div align="center"> <div align="center">
<img src='https://shields.io/badge/version-2.3.6-green.svg'> <img src='https://shields.io/badge/version-2.3.9-green.svg'>
<img src='https://shields.io/badge/author-Chang Zhang-dbab09.svg'> <img src='https://shields.io/badge/author-Chang Zhang-dbab09.svg'>
<img src='https://shields.io/badge/dependencies-Spring|aspectjweaver|tomcat|UIKit|Metricflow-r.svg'> <img src='https://shields.io/badge/dependencies-Spring|aspectjweaver|tomcat|UIKit|Metricflow-r.svg'>
</div> </div>
<h4>A lightweight springboot tool for tracing call graph ,which can help you find method's performances easily.</h4> <h4>A lightweight springboot tool for tracing call graph ,which can help you find method's performances easily.</h4>
- [x] Tracking the Java methods and calculating their execution times - ✅ Tracking the Java methods and calculating their execution times
- [x] Show the paths of methods - ✅ Show the paths of methods
- [x] Find exceptions occurred in methods - ✅ Find exceptions occurred in methods
- [x] Email you after finding an overtime method - ✅ Email you after finding an overtime method
- [x] Hot update online:you needn't restart it - ✅ Hot update online:you needn't restart it
- [x] Easy to use:you needn't additional learning costs - ✅ Thread manage:show threads information
- [x] Enough to add a pom dependency:you needn't additional deployment costs - ✅ Easy to use:you needn't additional learning costs
- ✅ Enough to add a pom dependency:you needn't additional deployment costs
![222](docs/kotime.gif) ![222](docs/kotime.gif)

View File

@ -7,7 +7,7 @@ add a dependency in pom.xml.
<dependency> <dependency>
<groupId>cn.langpy</groupId> <groupId>cn.langpy</groupId>
<artifactId>ko-time</artifactId> <artifactId>ko-time</artifactId>
<version>2.3.6</version> <version>2.3.9</version>
</dependency> </dependency>
``` ```

View File

@ -7,7 +7,7 @@
<dependency> <dependency>
<groupId>cn.langpy</groupId> <groupId>cn.langpy</groupId>
<artifactId>ko-time</artifactId> <artifactId>ko-time</artifactId>
<version>2.3.6</version> <version>2.3.9</version>
</dependency> </dependency>
<!--阿里云maven仓库更新会慢一两天左右拉取失败的切换到maven中央仓库--> <!--阿里云maven仓库更新会慢一两天左右拉取失败的切换到maven中央仓库-->
``` ```
@ -22,8 +22,8 @@
* 必填配置 * 必填配置
> >
> ko-time.pointcut=`execution(public * com.huoyo..*.*(..))` # 需要监测的范围是链路包含的范围不仅仅是接口层参考aop的@pointcut 或者左侧`常见问题` > ko-time.pointcut=`execution(public * com.huoyo..*.*(..))` #需要监测的范围是链路包含的范围不仅仅是接口层参考aop的@pointcut 或者左侧`常见问题`另外需要排除final相关类
> >
@ -34,11 +34,12 @@ ko-time.enable=true # 是否开启koTime默认开启当为false时
ko-time.log-enable=false # 是否开启控制输出默认false ko-time.log-enable=false # 是否开启控制输出默认false
ko-time.language=chinese # 语言english/chinese默认chinese ko-time.language=chinese # 语言english/chinese默认chinese
ko-time.threshold=800.0 # 时间阈值用于前端展示大于阈值显示红色小于阈值显示绿色默认800 ko-time.threshold=800.0 # 时间阈值用于前端展示大于阈值显示红色小于阈值显示绿色默认800
ko-time.context-path=http://localhost:80 # 前端页面调用接口的上下文环境,无法自动获取时可手动配置,一般情况切记不要配置 v2.0.1开始支持 # ko-time.context-path=http://localhost:80 # 前端页面调用接口的上下文环境,无法自动获取时可手动配置,一般情况切记不要配置 v2.0.1开始支持
ko-time.exception-enable=true # 是否开启异常检测默认为false,开启后会对方法内部抛出的异常进行统计 v2.0.0开始支持 ko-time.exception-enable=true # 是否开启异常检测默认为false,开启后会对方法内部抛出的异常进行统计 v2.0.0开始支持
ko-time.auth-enable=true # 是否开启认证默认为false,开启后需要登录才能访问调用链路 v2.0.2开始支持 ko-time.auth-enable=true # 是否开启认证默认为false,开启后需要登录才能访问调用链路 v2.0.2开始支持
ko-time.user-name=xxxx # 登录用户 v2.0.2开始支持 ko-time.user-name=xxxx # 登录用户 v2.0.2开始支持
ko-time.password=xxxx # 登录密码 v2.0.2开始支持 ko-time.password=xxxx # 登录密码 v2.0.2开始支持
# ko-time.static-token=xxxx # 使用静态的token值进行认证访问/koTime?kotoken=xxx v2.3.7开始支持该模式和user-name认证模式二选一
ko-time.param-analyse=true # 是否开启入参组合分析 默认开启 v2.0.8开始支持 双击方法节点即可看到效果 ko-time.param-analyse=true # 是否开启入参组合分析 默认开启 v2.0.8开始支持 双击方法节点即可看到效果
ko-time.data-reset=false # 启动时是否删除过往数据 默认false v2.2.3开始支持 ko-time.data-reset=false # 启动时是否删除过往数据 默认false v2.2.3开始支持
ko-time.thread-num=2 # 调用信息存储线程数为了不影响项目本身性能链路存储异步进行默认2该值并非越大越好瓶颈取决于数据库性能和服务器配置尽可能少占用项目资源为上 v2.2.0-BETA开始支持 ko-time.thread-num=2 # 调用信息存储线程数为了不影响项目本身性能链路存储异步进行默认2该值并非越大越好瓶颈取决于数据库性能和服务器配置尽可能少占用项目资源为上 v2.2.0-BETA开始支持
@ -53,7 +54,8 @@ ko-time.version-notice=true # 获取最新版本通知开关 在页面上可以
> 1.引入了上面的依赖和配置以后确认项目中是否有aop相关的包koTime使用了@Aspect注解未引入的自行引入如aspectj或者spring-boot-starter-aop > 1.引入了上面的依赖和配置以后确认项目中是否有aop相关的包koTime使用了@Aspect注解未引入的自行引入如aspectj或者spring-boot-starter-aop
> 2.做完前面的步骤koTime的集成已经完毕无需进行其他配置 > 2.做完前面的步骤koTime的集成已经完毕无需进行其他配置
> 3.如果后台有权限认证,需要放开`/koTime``/koTime/**` > 3.如果后台有权限认证,需要放开`/koTime``/koTime/**`
> 4.v2.2.5集成了邮件功能如果项目报错javamail相关的类NotFoundException时需要引入 > 4.如果项目对返回体做了全局的拦截包装处理请记得把KoTime放生KoTime有自己的返回格式
> 5.v2.2.5开始集成了邮件功能如果项目报错javamail相关的类NotFoundException时需要引入
``` ```
<dependency> <dependency>
@ -61,7 +63,7 @@ ko-time.version-notice=true # 获取最新版本通知开关 在页面上可以
<artifactId>spring-boot-starter-mail</artifactId> <artifactId>spring-boot-starter-mail</artifactId>
</dependency> </dependency>
``` ```
* 启动项目访问 `/koTime` 路径即可 * 启动项目访问 `/koTime` 路径即可
@ -69,7 +71,7 @@ ko-time.version-notice=true # 获取最新版本通知开关 在页面上可以
* 如果仅仅只是想统计某个方法,在方法上加上`@ComputeTime`即可,控制台会输出耗时 * 如果仅仅只是想统计某个方法,在方法上加上`@ComputeTime`即可,控制台会输出耗时
> 建议使用谷歌浏览器或者Edge浏览器IE是不可能支持的 > 建议使用谷歌浏览器(请升级的90.xx以后的版本早起版本可能存在部分样式不兼容)或者Edge浏览器IE是不可能支持的
如果项目自定义的contextpath访问如`http://localhost:8080/xxx服务/koTime` 如果项目自定义的contextpath访问如`http://localhost:8080/xxx服务/koTime`
@ -77,7 +79,8 @@ ko-time.version-notice=true # 获取最新版本通知开关 在页面上可以
如果页面能正常显示但是无法获取方法链路可配置ko-time.context-path=http://正确路径/myservice 进行koTime接口访问路径纠正 如果页面能正常显示但是无法获取方法链路可配置ko-time.context-path=http://正确路径/myservice 进行koTime接口访问路径纠正
> 特别说明如果出现ClassNotFound之类的错误一般都是依赖冲突或者对应的类没有引入自行解决kotime的依赖可参见源码的pom文件 > 如果出现ClassNotFound之类的错误一般都是依赖冲突或者对应的类没有引入自行解决kotime的依赖可参见源码的pom文件
--- ---