Skip to content

Commit e49837c

Browse files
committed
limit client datasize report
1 parent 4e55227 commit e49837c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cachecloud-open-web/src/main/java/com/sohu/cache/client/service/impl/ClientReportDataSizeServiceImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ public void save(ClientReportBean clientReportBean) {
4242
int valueMapSize = MapUtils.getInteger(otherInfo, ClientReportConstant.VALUE_MAP_SIZE, 0);
4343
int exceptionMapSize = MapUtils.getInteger(otherInfo, ClientReportConstant.EXCEPTION_MAP_SIZE, 0);
4444
int collectMapSize = MapUtils.getInteger(otherInfo, ClientReportConstant.COLLECTION_MAP_SIZE, 0);
45-
45+
// 只记录大于minSize
46+
int minSize = 100;
47+
if (costMapSize < minSize && valueMapSize < minSize && exceptionMapSize < minSize && collectMapSize < minSize) {
48+
return;
49+
}
4650
// 设置实体
4751
AppClientDataSizeStat appClientDataSizeStat = new AppClientDataSizeStat();
4852
appClientDataSizeStat.setClientIp(clientIp);

0 commit comments

Comments
 (0)