@Test
  @Ignore("This is just a performance test and shall not be run in auto test environment")
  public void testFetchSchemaPerformance() throws Exception {
    System.out.println(testParams.getTestModeName());
    final int deviceNum = 1000;
    final int measurementNum = 40;
    final ISchemaRegion schemaRegion = getSchemaRegion("root.sg", 0);
    for (int i = 0; i < deviceNum; i++) {
      for (int j = 0; j < measurementNum; j++) {
        schemaRegion.createTimeSeries(
            SchemaRegionWritePlanFactory.getCreateTimeSeriesPlan(
                new MeasurementPath("root.sg.d" + i + ".s" + j),
                TSDataType.BOOLEAN,
                TSEncoding.PLAIN,
                CompressionType.SNAPPY,
                null,
                null,
                null,
                null),
            -1);
      }
    }
    final PathPatternTree patternTree = new PathPatternTree();
    for (int i = 0; i < deviceNum; i++) {
      for (int j = 0; j < measurementNum; j++) {
        patternTree.appendFullPath(new MeasurementPath("root.sg.d" + i + ".s" + j));
      }
    }
    patternTree.constructTree();
    schemaRegion.fetchSeriesSchema(patternTree, Collections.emptyMap(), false, false, true, false);
    final long startTime = System.currentTimeMillis();
    for (int i = 0; i < 10; i++) {
      schemaRegion.fetchSeriesSchema(
          patternTree, Collections.emptyMap(), false, false, true, false);
    }
    System.out.println("Cost time: " + (System.currentTimeMillis() - startTime));
  }
This class define test cases for {@link ISchemaRegion}. All test cases will be run in both Memory
and PBTree modes. In PBTree mode, there are three kinds of test environment: full memory, partial
memory and non memory.
iotdb-core/datanode/src/test/java/org/apache/iotdb/db/metadata/schemaRegion/SchemaRegionBasicTest.java