public static void main(final String[] args) throws InterruptedException {
        String testPath = "D://temp";
        System.out.println("Test storage path:" + testPath);
        final File file = new File(testPath);
        file.mkdirs();
        int batchSize = 500;
        int logSize = 16 * 1024;
        int totalLogs = 1024 * 512;
        LogStorage logStorage = newLogStorage(testPath);
        LogStorageOptions opts = new LogStorageOptions();
        opts.setConfigurationManager(new ConfigurationManager());
        opts.setLogEntryCodecFactory(LogEntryV2CodecFactory.getInstance());
        logStorage.init(opts);
        // warm up files
        new DefaultLogStorageBenchmark(logStorage, logSize, totalLogs, batchSize).doTest();
        System.out.println("begin to shutdown");
        logStorage.shutdown();
        FileUtils.deleteQuietly(file);
    }
benchmark result:
total data : 8G
batchSize:200
1.Test write:
 *   Log number   :524288
 *   Log Size     :16384
 *   Batch Size   :200
 *   Cost time(s) :40s
 *   Total size   :8589934592


2.Test read:
  Log number   :524288
  Log Size     :16384
  Batch Size   :200
  Cost time(s) :6s
  Total size   :8589934592

If batchSize = 500
write cost times = 38s

If batchSize = 1000
write cost times = 32s

@author hzh (642256541@qq.com)
jraft-extension/java-log-storage-impl/src/test/java/com/alipay/sofa/jraft/storage/Benchmark/DefaultLogStorageBenchmark.java