@Override
  public void insertRecords(
      List<String> deviceIds,
      List<Long> times,
      List<List<String>> measurementsList,
      List<List<String>> valuesList)
      throws IoTDBConnectionException, StatementExecutionException {
    ISession session = getSession();
    try {
      session.insertRecords(deviceIds, times, measurementsList, valuesList);
      putBack(session);
    } catch (IoTDBConnectionException e) {
      // TException means the connection is broken, remove it and get a new one.
      LOGGER.warn("insertRecords failed", e);
      cleanSessionAndMayThrowConnectionException(session, FINAL_RETRY, e);
    } catch (StatementExecutionException | RuntimeException e) {
      putBack(session);
      throw e;
    } catch (Throwable e) {
      LOGGER.error(INSERT_RECORDS_ERROR_MSG, e);
      putBack(session);
      throw new RuntimeException(e);
    }
  }
Insert data in batch format, which can reduce the overhead of network. This method is just like
jdbc batch insert, we pack some insert request in batch and send them to server If you want
improve your performance, please see insertTablet method

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