public void selfPrintStatsInfo(boolean forcePrint,
            boolean needReset,
            StringBuilder strBuff) {
        if ((this.statsConfig.getStatsLevel() == StatsLevel.ZERO)
                || !this.statsConfig.isEnableSelfPrint()) {
            return;
        }
        long lstPrintTime = lstSelfPrintTime.get();
        long curChkTime = Clock.systemDefaultZone().millis();
        if (forcePrint || (curChkTime - lstPrintTime > this.statsConfig.getSelfPrintPeriodMs())) {
            if (lstSelfPrintTime.compareAndSet(lstPrintTime, curChkTime)) {
                if (switchWritingStatsUnit(needReset)) {
                    strBuff.append(this.logPrefix).append(", reset value= ");
                    getStatsInfo(switchableSets[getIndex(writableIndex.get() - 1)],
                            true, strBuff);
                } else {
                    strBuff.append(this.logPrefix).append(", value= ");
                    getStatsInfo(switchableSets[getIndex()], false, strBuff);
                }
                logger.info(strBuff.toString());
                strBuff.delete(0, strBuff.length());
            }
        }
    }
Self print statistics information to log file

@param forcePrint    whether force print statistics information
@param needReset     whether reset statistics set
@param strBuff       string buffer
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/common/ClientStatsInfo.java