public int calculateRecommendedParallelism(List<InlongStreamInfo> streamInfos) {
        long averageDataVolume;
        InlongStreamInfo streamInfo = streamInfos.get(0);
        try {
            averageDataVolume = getAverageDataVolume(streamInfo);
            log.info("Retrieved data volume: {}", averageDataVolume);
        } catch (Exception e) {
            log.error("Error retrieving data volume: {}", e.getMessage(), e);
            averageDataVolume = DEFAULT_ERROR_DATA_VOLUME;
        }
        int newParallelism = (int) (averageDataVolume / maximumMessagePerSecondPerCore);
        // Ensure parallelism is at most MAX_PARALLELISM
        newParallelism = Math.min(newParallelism, MAX_PARALLELISM);
        log.info("Calculated parallelism: {} for data volume: {}", newParallelism, averageDataVolume);
        return newParallelism;
    }
Calculate recommended parallelism based on maximum message per second per core

@return Recommended parallelism
inlong-manager/manager-plugins/base/src/main/java/org/apache/inlong/manager/plugin/flink/FlinkParallelismOptimizer.java