This commit is contained in:
huoyo 2022-06-08 10:50:41 +08:00
parent 71ca358244
commit 8ff98722e8
10 changed files with 30 additions and 18 deletions

View File

@ -4,7 +4,7 @@
<div align="center"> <div align="center">
<img src='https://shields.io/badge/version-2.0.9-green.svg'> <img src='https://shields.io/badge/version-2.2.2-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|Java JWT|aspectjweaver|tomcat|UIKit-r.svg'> <img src='https://shields.io/badge/dependencies-Spring|Java JWT|aspectjweaver|tomcat|UIKit-r.svg'>
<h4>A springboot tool for tracking the paths of the methods,which can help you to find methods's performances easily.</h4> <h4>A springboot tool for tracking the paths of the methods,which can help you to find methods's performances easily.</h4>
@ -77,8 +77,11 @@ After clicking a inteface method,you can find paths of the method
> V2.0.7Display routes for Controllers > V2.0.7Display routes for Controllers
> V2.0.8times for various params combinations > V2.0.8Times for various params combinations
> V2.2.0Support using database to store data
> V2.2.2Support the viewer to use English
## Copyright ## Copyright

View File

@ -4,7 +4,7 @@
</div> </div>
<div align="center"> <div align="center">
<img src='https://shields.io/badge/version-2.2.0-green.svg'> <img src='https://shields.io/badge/version-2.2.2-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|Java JWT|aspectjweaver|tomcat|UIKit-r.svg'> <img src='https://shields.io/badge/dependencies-Spring|Java JWT|aspectjweaver|tomcat|UIKit-r.svg'>
<h4>koTime是一个springboot项目性能分析工具通过追踪方法调用链路以及对应的运行时长快速定位性能瓶颈</h4> <h4>koTime是一个springboot项目性能分析工具通过追踪方法调用链路以及对应的运行时长快速定位性能瓶颈</h4>
@ -82,6 +82,10 @@
> V2.0.8:入参组合分析 > V2.0.8:入参组合分析
> V2.2.0:添加数据库存储支持
> V2.2.2:添加英文支持
## 特别说明 ## 特别说明
1.本项目使用java8开发其他版本未曾试验如有什么bug还请告知 1.本项目使用java8开发其他版本未曾试验如有什么bug还请告知

View File

@ -1,12 +1,13 @@
![logo](v200/kotime.png) ![logo](v200/kotime.png)
<small>v2.2.0@Huoyo</small> <small>v2.2.2@Huoyo</small>
> koTime是一个springboot方法调用链路追踪和运行时长统计工具 > KoTime是一个springboot方法调用链路追踪和运行时长统计工具
- web展示方法调用链路瓶颈可视化追踪 - web展示方法调用链路瓶颈可视化追踪
- 实时监听方法,统计运行时长 - 实时监听方法,统计运行时长
[Gitee](https://gitee.com/huoyo/ko-time) [Gitee](https://gitee.com/huoyo/ko-time)
[Github](https://github.com/huoyo/ko-time.git)
[文档教程](v220/introduce) [文档教程](v220/introduce)

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.2.0</version> <version>2.2.2</version>
</dependency> </dependency>
``` ```

View File

@ -37,9 +37,11 @@ A springboot tool for tracking the paths of the methods,which can help you to fi
> V2.0.7Display routes for Controllers > V2.0.7Display routes for Controllers
> V2.0.8times for various params combinations > V2.0.8Times for various params combinations
> V2.2.0support using database to store data > V2.2.0Support using database to store data
> V2.2.2Support the viewer to use English
## Author ## Author

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.2.0</version> <version>2.2.2</version>
</dependency> </dependency>
``` ```

View File

@ -44,6 +44,9 @@ koTime是一个springboot项目性能分析工具通过追踪方法调用链
> V2.2.0:添加数据库存储支持 > V2.2.0:添加数据库存储支持
> V2.2.2:添加英文支持
## 作者 ## 作者
> Huoyo/Zhang Chang > Huoyo/Zhang Chang

View File

@ -7,7 +7,6 @@ import cn.langpy.kotime.model.MethodNode;
import cn.langpy.kotime.util.BloomFilter; import cn.langpy.kotime.util.BloomFilter;
import cn.langpy.kotime.util.Common; import cn.langpy.kotime.util.Common;
import cn.langpy.kotime.util.Context; import cn.langpy.kotime.util.Context;
import cn.langpy.kotime.util.MethodType;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.lang.reflect.Parameter; import java.lang.reflect.Parameter;

View File

@ -135,7 +135,7 @@ public class Common {
public static void showLog(String method, double value) { public static void showLog(String method, double value) {
if ("chinese".equals(Context.getConfig().getLanguage())) { if ("chinese".equals(Context.getConfig().getLanguage())) {
log.info("调用方法=" + method + "(),耗时=" + value + "毫秒"); log.info("调用方法=" + method + "(),耗时=" + value + "毫秒");
} else if ( "english".equals(Context.getConfig().getLogLanguage())) { } else if ( "english".equals(Context.getConfig().getLanguage())) {
log.info("method=" + method + "()runTime=" + value + "ms"); log.info("method=" + method + "()runTime=" + value + "ms");
} }
} }

View File

@ -47,7 +47,7 @@
kotimeEnableDom.checked = kotimeEnable; kotimeEnableDom.checked = kotimeEnable;
let apiTip = document.getElementById('apiTip'); let apiTip = document.getElementById('apiTip');
apiTip.innerHTML = kotimeEnable==true?"We can see intefaces after invoking methods!":"KoTime switch was closed!"; apiTip.innerHTML = kotimeEnable==true?"We can see interfaces after invoking methods!":"KoTime switch was closed!";
let threshold = data['threshold']; let threshold = data['threshold'];
@ -138,9 +138,9 @@
let apiId = className+"."+methodName; let apiId = className+"."+methodName;
let color = avgRunTime>globalThreshold?'danger':'success'; let color = avgRunTime>globalThreshold?'danger':'success';
if (methodType=='Controller' && routeName!=null && routeName!='') { if (methodType=='Controller' && routeName!=null && routeName!='') {
html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp(<span style='font-size: 14px;font-weight: 430;color:#032b11'>"+routeName+"</span>)&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg: "+avgRunTime+" ms</span></li>"; html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp(<span style='font-size: 14px;font-weight: 430;color:#032b11'>"+routeName+"</span>)&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg "+avgRunTime+" ms</span></li>";
}else{ }else{
html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg: "+avgRunTime+" ms</span></li>"; html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg "+avgRunTime+" ms</span></li>";
} }
}; };
element.innerHTML = html; element.innerHTML = html;
@ -332,9 +332,9 @@
let color = avgRunTime>globalThreshold?'danger':'success'; let color = avgRunTime>globalThreshold?'danger':'success';
if (methodType=='Controller' && routeName!=null && routeName!='') { if (methodType=='Controller' && routeName!=null && routeName!='') {
html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp(<span style='font-size: 14px;font-weight: 430;color:#032b11'>"+routeName+"</span>)&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg: "+avgRunTime+" ms</span></li>"; html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp(<span style='font-size: 14px;font-weight: 430;color:#032b11'>"+routeName+"</span>)&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg "+avgRunTime+" ms</span></li>";
}else{ }else{
html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg: "+avgRunTime+" ms</span></li>"; html += "<li onclick=\"showMethods('"+apiId+"')\" style='color: #333;font-weight: 400;font-size: 14px;' id=\""+apiId+"-list\">"+ className+"#<span style='font-size: 16px;font-weight: 500;'>"+methodName+"</span>&nbsp &nbsp<span style='font-size: 10px;' class=\"uk-label uk-label-"+color+"\">avg "+avgRunTime+" ms</span></li>";
} }
}; };
element.innerHTML = html; element.innerHTML = html;
@ -357,7 +357,7 @@
<ul class="uk-flex-center" uk-tab> <ul class="uk-flex-center" uk-tab>
<li id="zl" class="uk-active"><a href="#" >Summary</a></li> <li id="zl" class="uk-active"><a href="#" >Summary</a></li>
<li id="jklb"><a href="#" >Intefaces</a></li> <li id="jklb"><a href="#" >Interfaces</a></li>
<li><a href="#" >Exceptions</a></li> <li><a href="#" >Exceptions</a></li>
<li><a href="#" >Configurations</a></li> <li><a href="#" >Configurations</a></li>
<li><a href="#" >Contact me</a></li> <li><a href="#" >Contact me</a></li>
@ -366,7 +366,7 @@
<ul class="uk-switcher uk-margin"> <ul class="uk-switcher uk-margin">
<li style="margin-left: 30%;margin-right: 30%;"> <li style="margin-left: 30%;margin-right: 30%;">
<ul class="uk-flex-left" uk-tab> <ul class="uk-flex-left" uk-tab>
<li class="uk-active"><a href="#" >Number of Inteface</a></li> <li class="uk-active"><a href="#" >Number of Interface</a></li>
</ul> </ul>
<div style="margin-top: 20px;" class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid> <div style="margin-top: 20px;" class="uk-grid-small uk-child-width-expand@s uk-text-center" uk-grid>
<div> <div>