@Override
  public void insertRecords(
      List<String> deviceIds,
      List<Long> times,
      List<List<String>> measurementsList,
      List<List<TSDataType>> typesList,
      List<List<Object>> valuesList)
      throws IoTDBConnectionException, StatementExecutionException {
    int len = deviceIds.size();
    if (len != times.size() || len != measurementsList.size() || len != valuesList.size()) {
      throw new IllegalArgumentException(
          "deviceIds, times, measurementsList and valuesList's size should be equal");
    }
    // judge if convert records to tablets.
    if (enableRecordsAutoConvertTablet && len >= MIN_RECORDS_SIZE) {
      Set<String> deviceSet = new HashSet<>(deviceIds);
      if ((double) deviceSet.size() / deviceIds.size() <= CONVERT_THRESHOLD
          && judgeConvertOfMultiDevice(deviceIds, measurementsList)) {
        convertToTabletsAndInsert(
            deviceIds, times, measurementsList, typesList, valuesList, deviceSet.size(), false);
        return;
      }
    }
    // insert records
    if (enableRedirection) {
      insertRecordsWithLeaderCache(
          deviceIds, times, measurementsList, typesList, valuesList, false);
    } else {
      TSInsertRecordsReq request;
      try {
        request =
            filterAndGenTSInsertRecordsReq(
                deviceIds, times, measurementsList, typesList, valuesList, false);
      } catch (NoValidValueException e) {
        logger.warn(ALL_VALUES_ARE_NULL_MULTI_DEVICES, deviceIds, times, measurementsList);
        return;
      }
      try {
        defaultSessionConnection.insertRecords(request);
      } catch (RedirectException ignored) {
      }
    }
  }
Insert multiple rows, which can reduce the overhead of network. This method is just like jdbc
executeBatch, we pack some insert request in batch and send them to server. If you want improve
your performance, please see insertTablet method

<p>Each row is independent, which could have different deviceId, time, number of measurements

@see Session#insertTablet(Tablet)
iotdb-client/session/src/main/java/org/apache/iotdb/session/Session.java