Commit 2630b65f authored by yanzg's avatar yanzg

修复等待时间

parent 55785ef7
...@@ -91,13 +91,13 @@ public class AspectLogTime implements ThreadNext.Next, InitializingBean { ...@@ -91,13 +91,13 @@ public class AspectLogTime implements ThreadNext.Next, InitializingBean {
/** /**
* 结束 * 结束
* *
* @param url  请求地址 * @param url 请求地址
* @param time 执行时间 * @param time 执行时间
* @param isLog 是否记录日志 * @param isError 是否错误
*/ */
public void finish(String url, long time, boolean isLog) { public void finish(String url, long time, boolean isError) {
AspectUrlCountVo count = getCount(url); AspectUrlCountVo count = getCount(url);
count.addFinish(time, isLog); count.addFinish(time, isError);
} }
@Override @Override
......
...@@ -12,7 +12,7 @@ public class AspectUrlCountVo { ...@@ -12,7 +12,7 @@ public class AspectUrlCountVo {
private volatile String url; private volatile String url;
private volatile int startCount; private volatile int startCount;
private volatile int endCount; private volatile int endCount;
private volatile int logCount; private volatile int errorCount;
private volatile long totalTime; private volatile long totalTime;
private volatile long avgTime; private volatile long avgTime;
private volatile long minTime = Long.MAX_VALUE; private volatile long minTime = Long.MAX_VALUE;
...@@ -32,7 +32,7 @@ public class AspectUrlCountVo { ...@@ -32,7 +32,7 @@ public class AspectUrlCountVo {
synchronized (lockFinish) { synchronized (lockFinish) {
this.endCount++; this.endCount++;
if (isLog) { if (isLog) {
this.logCount++; this.errorCount++;
} }
this.totalTime += time; this.totalTime += time;
this.minTime = Math.min(time, this.minTime); this.minTime = Math.min(time, this.minTime);
...@@ -65,12 +65,12 @@ public class AspectUrlCountVo { ...@@ -65,12 +65,12 @@ public class AspectUrlCountVo {
this.endCount = endCount; this.endCount = endCount;
} }
public int getLogCount() { public int getErrorCount() {
return logCount; return errorCount;
} }
public void setLogCount(int logCount) { public void setErrorCount(int errorCount) {
this.logCount = logCount; this.errorCount = errorCount;
} }
public long getTotalTime() { 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