mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Canal metrics snapshot version.
This commit is contained in:
@@ -52,7 +52,8 @@ public class MysqlConnection implements ErosaConnection {
|
||||
private AuthenticationInfo authInfo;
|
||||
protected int connTimeout = 5 * 1000; // 5秒
|
||||
protected int soTimeout = 60 * 60 * 1000; // 1小时
|
||||
private AtomicLong receivedBinlogBytes;
|
||||
// dump binlog bytes, 暂不包括meta与TSDB
|
||||
private AtomicLong receivedBinlogBytes;
|
||||
|
||||
public MysqlConnection(){
|
||||
}
|
||||
|
||||
@@ -187,6 +187,11 @@ public class MysqlMultiStageCoprocessor extends AbstractCanalLifeCycle implement
|
||||
//LockSupport.parkNanos(1L);
|
||||
applyWait(++fullTimes);
|
||||
interupted = Thread.interrupted();
|
||||
if (fullTimes % 1000 == 0) {
|
||||
long nextStart = System.nanoTime();
|
||||
eventsPublishBlockingTime.addAndGet(nextStart - blockingStart);
|
||||
blockingStart = nextStart;
|
||||
}
|
||||
}
|
||||
} while (!interupted && isStart());
|
||||
return isStart();
|
||||
|
||||
Reference in New Issue
Block a user