ko-time/README.md
2020-12-10 22:22:36 +08:00

1.7 KiB
Raw Blame History

koTime

介绍

koTime是一个springboot项目性能分析工具通过追踪方法调用链路以及对应的运行时长快速定位性能瓶颈

优点:

  • 实时监听方法,统计运行时长
  • web展示方法调用链路瓶颈可视化追踪

缺点:

  • 仅支撑单体应用

安装教程

  1. 引入依赖 或者 下载发行版本
 <dependency>
    <groupId>cn.langpy</groupId>
    <artifactId>ko-time</artifactId>
    <version>1.0</version>
  </dependency>
  1. 配置信息

在application.yml中配置

spring.profiles.active=koTime

使用说明

  1. 新建一个类实现ComputeTimeHandlerInterface并在 @Pointcut 写入 需要监测的范围
@Component
@Aspect
public class RunTimeHandler implements ComputeTimeHandlerInterface {
    @Override
    @Pointcut("execution(* com.huoyo..*.*(..))")
    public void prog() {

    }
}

  1. 启动项目访问 /koTime 路径即可

比如:http://localhost:8080/koTime 如果项目自定义的contextpath访问如http://localhost:8080/xxx服务/koTime

版本说明

输入图片说明

1.接口列表总览

在列表中会显示该接口的运行耗时,如果为绿色则无需优化,如果为红色,需要详细查看问题所在

输入图片说明

2.调用详情

点开接口时,会显示该接口的调用链路以及运行时长

输入图片说明

版本说明

V1.0-