public static int calculate()

in src/main/java/com/aliyun/openservices/aliyun/log/producer/internals/LogSizeCalculator.java [9:21]


  public static int calculate(LogItem logItem) {
    int sizeInBytes = 8;
    for (LogContent content : logItem.GetLogContents()) {
      sizeInBytes += 8;
      if (content.mKey != null) {
        sizeInBytes += content.mKey.length();
      }
      if (content.mValue != null) {
        sizeInBytes += content.mValue.length();
      }
    }
    return sizeInBytes;
  }