public void snapshot(final boolean isSstSnapshot, final boolean isFastSnapshot) throws IOException {
        final File backupDir = new File("backup");
        if (backupDir.exists()) {
            FileUtils.deleteDirectory(backupDir);
        }
        FileUtils.forceMkdir(backupDir);

        final LocalFileMeta meta = doSnapshotSave(backupDir.getAbsolutePath(), isSstSnapshot, isFastSnapshot);

        this.kvStore.shutdown();
        FileUtils.deleteDirectory(new File(this.tempPath));
        FileUtils.forceMkdir(new File(this.tempPath));
        this.kvStore = new RocksRawKVStore("test");
        this.kvStore.init(this.dbOptions);

        final String name;
        if (isSstSnapshot) {
            name = "sst";
        } else {
            if (isFastSnapshot) {
                name = "fast";
            } else {
                name = "slow";
            }
        }

        final long decompressStart = System.nanoTime();
        final String sourceFile = Paths.get(backupDir.getAbsolutePath(), SNAPSHOT_ARCHIVE).toString();
        ZipUtil.decompress(sourceFile, backupDir.getAbsolutePath(), new CRC64());
        System.out.println(name + " decompress time cost: "
                           + TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - decompressStart));

        final long loadStart = System.nanoTime();
        doSnapshotLoad(backupDir.getAbsolutePath(), meta, isFastSnapshot);

        System.out.println(name + " load snapshot time cost: "
                           + TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - loadStart));
        FileUtils.deleteDirectory(backupDir);
    }
-----------------------------------------------
        db size = 10000000
        slow save snapshot time cost: 2552
        slow compressed file size: 41915298
        slow compress time cost: 9173
        slow load snapshot time cost: 5119
        -----------------------------------------------
        db size = 10000000
        fast save snapshot time cost: 524
        fast compressed file size: 41920248
        fast compress time cost: 8807
        fast load snapshot time cost: 3090
        -----------------------------------------------
        db size = 10000000
        sst save snapshot time cost: 4296
        sst compressed file size: 10741032
        sst compress time cost: 2005
        sst load snapshot time cost: 593
        -----------------------------------------------
        db size = 10000000
        slow save snapshot time cost: 2248
        slow compressed file size: 41918551
        slow compress time cost: 8705
        slow load snapshot time cost: 4485
        -----------------------------------------------
        db size = 10000000
        fast save snapshot time cost: 508
        fast compressed file size: 41914702
        fast compress time cost: 8736
        fast load snapshot time cost: 3047
        -----------------------------------------------
        db size = 10000000
        sst save snapshot time cost: 4206
        sst compressed file size: 10741032
        sst compress time cost: 1950
        sst load snapshot time cost: 599
        -----------------------------------------------
        db size = 10000000
        slow save snapshot time cost: 2327
        slow compressed file size: 41916640
        slow compress time cost: 8643
        slow load snapshot time cost: 4590
        -----------------------------------------------
        db size = 10000000
        fast save snapshot time cost: 511
        fast compressed file size: 41914533
        fast compress time cost: 8704
        fast load snapshot time cost: 3013
        -----------------------------------------------
        db size = 10000000
        sst save snapshot time cost: 4253
        sst compressed file size: 10741032
        sst compress time cost: 1947
        sst load snapshot time cost: 590
        -----------------------------------------------
jraft-rheakv/rheakv-core/src/test/java/com/alipay/sofa/jraft/rhea/benchmark/raw/SnapshotBenchmark.java