Add header size for each packet.

This commit is contained in:
Chuanyi Li
2018-08-16 07:59:45 +08:00
parent efb7adc967
commit 3053b9635a
11 changed files with 2 additions and 90 deletions

View File

@@ -7,6 +7,7 @@ import org.jboss.netty.channel.ChannelFuture;
import org.jboss.netty.channel.ChannelFutureListener;
import static com.alibaba.otter.canal.server.netty.CanalServerWithNettyProfiler.profiler;
import static com.alibaba.otter.canal.server.netty.NettyUtils.HEADER_LENGTH;
/**
* @author Chuanyi Li
@@ -32,7 +33,7 @@ public class ChannelFutureAggregator implements ChannelFutureListener {
.destination(destination)
.type(type)
.request(request)
.amount(amount)
.amount(amount + HEADER_LENGTH)
.latency(latency)
.errorCode(errorCode)
.empty(empty)