@Test
    public void testLeveldbPut() throws IOException {

        org.iq80.leveldb.DB db;

        Options options;
        options = new Options();
        options.createIfMissing(true);
        options.cacheSize(100 * 1024 * 1024);   // 100M
        options.maxOpenFiles(400);
        FileUtils.createDirIfNotExist(new File(path + "/leveldb"));
        JniDBFactory.factory.repair(new File(path + "/leveldb"), options);
        db = JniDBFactory.factory.open(new File(path + "/leveldb"), options);

        long start = System.currentTimeMillis();

        for (int i = 0; i < 100000; i++) {
            db.put(("testKey" + i).getBytes("UTF-8"), ("testvalue" + i).getBytes("UTF-8"));
        }
        //972
        System.out.println(System.currentTimeMillis() - start);
    }
@author Robert HG (254963746@qq.com) on 12/13/15.
lts-core/src/test/java/com/github/ltsopensource/core/failstore/ltsdb/DBTest.java