Commit 2630b65f authored by yanzg's avatar yanzg

修复等待时间

parent 55785ef7
......@@ -91,13 +91,13 @@ public class AspectLogTime implements ThreadNext.Next, InitializingBean {
/**
* 结束
*
* @param url  请求地址
* @param time 执行时间
* @param isLog 是否记录日志
* @param url 请求地址
* @param time 执行时间
* @param isError 是否错误
*/
public void finish(String url, long time, boolean isLog) {
public void finish(String url, long time, boolean isError) {
AspectUrlCountVo count = getCount(url);
count.addFinish(time, isLog);
count.addFinish(time, isError);
}
@Override
......
......@@ -12,7 +12,7 @@ public class AspectUrlCountVo {
private volatile String url;
private volatile int startCount;
private volatile int endCount;
private volatile int logCount;
private volatile int errorCount;
private volatile long totalTime;
private volatile long avgTime;
private volatile long minTime = Long.MAX_VALUE;
......@@ -32,7 +32,7 @@ public class AspectUrlCountVo {
synchronized (lockFinish) {
this.endCount++;
if (isLog) {
this.logCount++;
this.errorCount++;
}
this.totalTime += time;
this.minTime = Math.min(time, this.minTime);
......@@ -65,12 +65,12 @@ public class AspectUrlCountVo {
this.endCount = endCount;
}
public int getLogCount() {
return logCount;
public int getErrorCount() {
return errorCount;
}
public void setLogCount(int logCount) {
this.logCount = logCount;
public void setErrorCount(int errorCount) {
this.errorCount = errorCount;
}
public long getTotalTime() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment