public void GeneralIndexTest() throws IOException {
    PartitionManager manager = new PartitionManager(new ConfigManager(), new PartitionInfo());
    int[] bucket = new int[deviceGroupCount];
    Arrays.fill(bucket, 0);

    long totalTime = 0;
    for (int i = 0; i < batchCount; i++) {
      List<IDeviceID> devices = genBatchDevices();
      totalTime -= System.currentTimeMillis();
      for (IDeviceID device : devices) {
        bucket[manager.getSeriesPartitionSlot(device).getSlotId()] += 1;
      }
      totalTime += System.currentTimeMillis();
    }

    Arrays.sort(bucket);
    int firstNotNull = 0;
    for (; ; firstNotNull++) {
      if (bucket[firstNotNull] > 0) {
        break;
      }
    }
    System.out.println("Empty DeviceGroup count: " + firstNotNull);
    System.out.println("Minimum DeviceGroup size: " + bucket[firstNotNull]);
    System.out.println("Maximal DeviceGroup size: " + bucket[deviceGroupCount - 1]);
    System.out.println(
        "Average size of nonempty DeviceGroup: "
            + (double) (batchCount * batchSize) / (double) (deviceGroupCount - firstNotNull));
    System.out.println(
        "Median size of nonempty DeviceGroup: " + bucket[(deviceGroupCount - firstNotNull) / 2]);
    System.out.println("Total time-consuming: " + (double) totalTime / 1000.0 + "s");
  }
This is a not active test class, which can be used for general index testing when there is a new
DeviceGroup hash algorithm
iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/manager/hash/DeviceGroupHashExecutorManualTest.java