public static void main(String[] args) throws IllegalPathException {
    IMemTable memTable = new PrimitiveMemTable(database, dataRegionId);
    final long startTime = System.currentTimeMillis();
    // cpu not locality
    for (int i = 0; i < numOfPoint; i++) {
      for (int j = 0; j < numOfMeasurement; j++) {
        memTable.write(
            DeviceIDFactory.getInstance().getDeviceID(new PartialPath(deviceId)),
            Collections.singletonList(
                new MeasurementSchema(measurementId[j], tsDataType, TSEncoding.PLAIN)),
            System.nanoTime(),
            new Object[] {System.currentTimeMillis()});
      }
    }

    final long endTime = System.currentTimeMillis();
    System.out.println(
        String.format(
            "Num of time series: %d, "
                + "Num of points for each time series: %d, "
                + "The total time: %d ms. ",
            numOfMeasurement, numOfPoint, endTime - startTime));
  }
Memtable insert benchmark. Bench the Memtable and get its performance.
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/storageengine/dataregion/memtable/MemtableBenchmark.java