From c2ffaf1048f53b8789a83a01d0b82b282fde7472 Mon Sep 17 00:00:00 2001
From: lyy <2424809934@qq.com>
Date: Tue, 17 Oct 2023 20:43:37 +0800
Subject: [PATCH 1/5] add benchmark
---
benchmark/pom.xml | 41 +++++++++
.../net/openio/opendb/OpenDBBenchmark.java | 88 +++++++++++++++++++
.../net/openio/opendb/db/ColumnFamily.java | 6 +-
.../java/net/openio/opendb/db/OpenDB.java | 2 +-
.../java/net/openio/opendb/db/OpenDBImp.java | 29 +++---
.../java/net/openio/opendb/mem/MemTable.java | 4 -
.../net/openio/opendb/mem/SkipListRep.java | 20 +++--
.../java/net/openio/opendb/model/Status.java | 2 +-
.../net/openio/opendb/tool/FileUtils.java | 12 +--
.../java/net/openio/opendb/OpenDBTest.java | 17 +++-
.../compaction/CompactionIteratorTest.java | 12 ++-
.../openio/opendb/mem/SKipListRepTest.java | 14 ++-
12 files changed, 191 insertions(+), 56 deletions(-)
create mode 100644 benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java
diff --git a/benchmark/pom.xml b/benchmark/pom.xml
index 74a30c2..e1d3a5a 100644
--- a/benchmark/pom.xml
+++ b/benchmark/pom.xml
@@ -31,6 +31,11 @@
benchmark
+
+ opendb-core
+ net.openio.opendb
+ ${project.version}
+
org.openjdk.jmh
jmh-core
@@ -42,5 +47,41 @@
1.35
+
+
+
+ org.apache.maven.plugins
+ maven-shade-plugin
+ 3.2.1
+
+
+ package
+
+ shade
+
+
+ benchmarks
+
+
+ org.openjdk.jmh.Main
+
+
+
+
+ *:*
+
+ META-INF/*.SF
+ META-INF/*.DSA
+ META-INF/*.RSA
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java b/benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java
new file mode 100644
index 0000000..b26433f
--- /dev/null
+++ b/benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the OpenIO.Net under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package net.openio.opendb;
+
+
+import net.openio.opendb.db.ColumnFamilyHandle;
+import net.openio.opendb.db.OpenDB;
+import net.openio.opendb.db.OpenDBImp;
+import net.openio.opendb.model.ColumnFamilyDescriptor;
+import net.openio.opendb.model.OperationType;
+import net.openio.opendb.model.Options;
+import net.openio.opendb.model.key.IntKey;
+import net.openio.opendb.model.key.KeyType;
+import net.openio.opendb.model.value.IntValue;
+import net.openio.opendb.model.value.ValueType;
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.Fork;
+import org.openjdk.jmh.annotations.Measurement;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+import org.openjdk.jmh.annotations.Scope;
+import org.openjdk.jmh.annotations.Setup;
+import org.openjdk.jmh.annotations.State;
+import org.openjdk.jmh.annotations.TearDown;
+import org.openjdk.jmh.annotations.Timeout;
+import org.openjdk.jmh.annotations.Warmup;
+import org.openjdk.jmh.infra.Blackhole;
+
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
+@State(Scope.Benchmark)
+@Warmup(iterations = 0)
+@OutputTimeUnit(TimeUnit.SECONDS)
+@Measurement(iterations = 1,time = 60, timeUnit = TimeUnit.SECONDS)
+@Fork(value = 1)
+public class OpenDBBenchmark {
+
+ static OpenDB openDB;
+ static ColumnFamilyHandle columnFamilyHandle;
+ static int i = 0;
+
+ @Setup
+ public void stepUp(){
+ openDB = OpenDBImp.open(new Options(), "D:/data/git/jDB/opendb-core/src/test/resources/data/");
+ ColumnFamilyDescriptor columnFamilyDescriptor = new ColumnFamilyDescriptor();
+ columnFamilyDescriptor.setName("luoluoyuyu");
+ columnFamilyDescriptor.setKeyType(KeyType.intKey);
+ columnFamilyDescriptor.setValueType(ValueType.intValue);
+ columnFamilyDescriptor.setBlockSize(1 << 12);
+ openDB.createColumnFamily(columnFamilyDescriptor);
+ columnFamilyHandle = openDB.getColumnFamilyHandle("luoluoyuyu").date;
+ ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
+
+ }
+
+ @Benchmark
+ @Timeout(time = 20, timeUnit = TimeUnit.SECONDS)
+ public void addKeyValue(Blackhole bh) throws Exception {
+ bh.consume(openDB.put(new IntKey(++i), new IntValue(i, OperationType.insert), columnFamilyHandle));
+ }
+
+
+ @Benchmark
+ public void getKeyValue(Blackhole bh) throws Exception {
+ bh.consume(openDB.get(new IntKey(--i), columnFamilyHandle));
+ }
+
+ @TearDown
+ public void closeDatabase() {
+ openDB.close();
+ }
+
+}
diff --git a/opendb-core/src/main/java/net/openio/opendb/db/ColumnFamily.java b/opendb-core/src/main/java/net/openio/opendb/db/ColumnFamily.java
index 1043a6f..693eebc 100644
--- a/opendb-core/src/main/java/net/openio/opendb/db/ColumnFamily.java
+++ b/opendb-core/src/main/java/net/openio/opendb/db/ColumnFamily.java
@@ -76,6 +76,7 @@ public Value getValue(Key key, Comparator comparator) {
for (MemTable memTable : memTables) {
Value value = memTable.get(key, comparator);
if (value != null) {
+ readWriteLock.readLock().unlock();
return value;
}
}
@@ -142,10 +143,10 @@ public Levels getCopyLevels() {
public void add(Key key, Value value) {
KeyValueEntry keyValueEntry = new KeyValueEntry(key, value);
- readWriteLock.readLock().lock();
int s = keyType.getByteSize(key) + valueType.getByteSize(value);
size.addAndGet(s);
while (true) {
+ readWriteLock.readLock().lock();
for (MemTable memTable : memTables) {
if (!memTable.isCanWrite()) {
@@ -162,6 +163,7 @@ public void add(Key key, Value value) {
readWriteLock.readLock().unlock();
return;
}
+ readWriteLock.readLock().unlock();
addMemTable();
}
@@ -171,7 +173,7 @@ public void add(Key key, Value value) {
public ColumnFamily() {
memTables = new ArrayList<>(8);
immMemTable = new ArrayList<>(8);
- for (int i = 0; i < 128; i++) {
+ for (int i = 0; i < 1; i++) {
memTables.add(new MemTable(new SkipListRep(), new BloomFilter()));
}
levels = new Levels();
diff --git a/opendb-core/src/main/java/net/openio/opendb/db/OpenDB.java b/opendb-core/src/main/java/net/openio/opendb/db/OpenDB.java
index d537251..d8db31a 100644
--- a/opendb-core/src/main/java/net/openio/opendb/db/OpenDB.java
+++ b/opendb-core/src/main/java/net/openio/opendb/db/OpenDB.java
@@ -32,7 +32,7 @@ public interface OpenDB {
Status update(Key key, Value value, ColumnFamilyHandle columnFamilyHandle);
- Status delete(Key key, ColumnFamilyHandle columnFamilyHandle);
+ Status delete(Key key, Value value, ColumnFamilyHandle columnFamilyHandle);
Status getColumnFamilyHandle(String name);
diff --git a/opendb-core/src/main/java/net/openio/opendb/db/OpenDBImp.java b/opendb-core/src/main/java/net/openio/opendb/db/OpenDBImp.java
index 28f484b..8cab9a4 100644
--- a/opendb-core/src/main/java/net/openio/opendb/db/OpenDBImp.java
+++ b/opendb-core/src/main/java/net/openio/opendb/db/OpenDBImp.java
@@ -101,7 +101,7 @@ public static OpenDB open(Options option, String dir) {
openDBImp.comparator = (a, b) -> {
int d = a.compareTo(b);
if (d == 0) {
- d = a.getSequenceNumber().compareTo(b.getSequenceNumber());
+ d = a.getSequenceNumber().compareTo(b.getSequenceNumber()) >= 0 ? 0 : 1;
}
return d;
};
@@ -118,6 +118,8 @@ private static DataMeta getMetaData(String dir) {
public Status get(Key key, ColumnFamilyHandle columnFamilyHandle) {
SequenceNumber sequenceNumber = writeBatch.getMaxSequenceNumber();
Snapshot snapshot = snapshotManager.addSnapshot(sequenceNumber);
+ key = key.copy();
+ key.setSequenceNumber(sequenceNumber);
Status status = new Status<>(columnFamilyManager.get(columnFamilyHandle.getColumnFamilyId(), key, comparator));
snapshotManager.removeSnapshot(snapshot);
return status;
@@ -128,6 +130,7 @@ public Status put(Key key, Value value, ColumnFamilyHandle columnFamilyHa
value.setType(OperationType.insert);
key = key.copy();
value = value.copy();
+
writeBatch.addLog(new WalLog(columnFamilyHandle.getColumnFamilyId(), key, value, columnFamilyHandle.keyType,
columnFamilyHandle.valueType));
columnFamilyManager.add(key, value, columnFamilyHandle.getColumnFamilyId());
@@ -136,31 +139,21 @@ public Status put(Key key, Value value, ColumnFamilyHandle columnFamilyHa
@Override
public Status update(Key key, Value value, ColumnFamilyHandle columnFamilyHandle) {
- SequenceNumber sequenceNumber = writeBatch.getMaxSequenceNumber();
- Snapshot snapshot = snapshotManager.addSnapshot(sequenceNumber);
- Value value1 = columnFamilyManager.get(columnFamilyHandle.getColumnFamilyId(), key, comparator);
- snapshotManager.removeSnapshot(snapshot);
- if (value1 == null) {
- return Status.fail();
- }
key = key.copy();
+ value = value.copy();
value.setType(OperationType.update);
+ writeBatch.addLog(new WalLog(columnFamilyHandle.getColumnFamilyId(), key, value, columnFamilyHandle.keyType,
+ columnFamilyHandle.valueType));
columnFamilyManager.add(key, value, columnFamilyHandle.getColumnFamilyId());
- return new Status<>(value1);
+ return new Status<>();
}
@Override
- public Status delete(Key key, ColumnFamilyHandle columnFamilyHandle) {
- SequenceNumber sequenceNumber = writeBatch.getMaxSequenceNumber();
- Snapshot snapshot = snapshotManager.addSnapshot(sequenceNumber);
- Value value = columnFamilyManager.get(columnFamilyHandle.getColumnFamilyId(), key, comparator);
- snapshotManager.removeSnapshot(snapshot);
- if (value == null) {
- Status.fail();
- }
+ public Status delete(Key key, Value value, ColumnFamilyHandle columnFamilyHandle) {
key = key.copy();
Value v = value.copy();
- v.setType(OperationType.delete);
+ writeBatch.addLog(new WalLog(columnFamilyHandle.getColumnFamilyId(), key, value, columnFamilyHandle.keyType,
+ columnFamilyHandle.valueType));
columnFamilyManager.add(key, value, columnFamilyHandle.getColumnFamilyId());
return new Status<>(value);
}
diff --git a/opendb-core/src/main/java/net/openio/opendb/mem/MemTable.java b/opendb-core/src/main/java/net/openio/opendb/mem/MemTable.java
index 568b6ac..b23924a 100644
--- a/opendb-core/src/main/java/net/openio/opendb/mem/MemTable.java
+++ b/opendb-core/src/main/java/net/openio/opendb/mem/MemTable.java
@@ -77,10 +77,6 @@ public boolean put(KeyValueEntry key, int size) {
public boolean put(List key) {
- if (increaseCount()) {
- return false;
- }
-
memTableRep.addKeyValue(key);
bloomFilter.add(key);
diff --git a/opendb-core/src/main/java/net/openio/opendb/mem/SkipListRep.java b/opendb-core/src/main/java/net/openio/opendb/mem/SkipListRep.java
index f6b2720..ea900d0 100644
--- a/opendb-core/src/main/java/net/openio/opendb/mem/SkipListRep.java
+++ b/opendb-core/src/main/java/net/openio/opendb/mem/SkipListRep.java
@@ -34,7 +34,7 @@ public class SkipListRep implements MemTableRep
private static final int MAX_LEVEL = 32;
- private volatile Node[] head;
+ private final Node[] head;
private static final double P = 0.75;
@@ -71,7 +71,7 @@ public void addKeyValue(KeyValueEntry keyValue) {
i--;
continue;
}
- Key key = ((NodeImp) le[i].next[0]).key;
+ Key key = getNodeImp(le[i].next).key;
int d = com(key, keyValue.getKey());
if (d > 0) {
i--;
@@ -115,19 +115,20 @@ private void add(Node[][] nodes, Node[] node) {
@Override
public Value getValue(Key key, Comparator comparator) {
+
Node[] le = head;
for (int i = MAX_LEVEL - 1; i >= 0; ) {
if (le[i].next == null) {
i--;
continue;
}
- int d = comparator.compare(key, ((NodeImp) le[0]).key);
- if (d > 0) {
+ int d = comparator.compare(key, getNodeImp(le[i].next).key);
+ if (d < 0) {
i--;
continue;
}
if (d == 0) {
- return ((NodeImp) le[i].next[0]).get().getValue();
+ return getNodeImp(le[i].next).getValue();
}
le = le[i].next;
}
@@ -144,6 +145,11 @@ static class Node {
volatile Node[] next;
}
+ private NodeImp getNodeImp(Node[] node){
+ return (NodeImp) node[0];
+
+ }
+
static final class NodeImp extends Node {
private Key key;
@@ -157,8 +163,8 @@ Key getKey(Node[] node) {
return ((NodeImp) node[0]).key;
}
- Value getValue(Node[] node) {
- return ((NodeImp) node[0]).values.getValue();
+ Value getValue() {
+ return (this).values.getValue();
}
private NodeImp(final KeyValueEntry kv) {
diff --git a/opendb-core/src/main/java/net/openio/opendb/model/Status.java b/opendb-core/src/main/java/net/openio/opendb/model/Status.java
index 051dc43..82a8cab 100644
--- a/opendb-core/src/main/java/net/openio/opendb/model/Status.java
+++ b/opendb-core/src/main/java/net/openio/opendb/model/Status.java
@@ -38,7 +38,7 @@ public Status(K value) {
}
public Status() {
-
+ success = true;
}
public static Status fail() {
diff --git a/opendb-core/src/main/java/net/openio/opendb/tool/FileUtils.java b/opendb-core/src/main/java/net/openio/opendb/tool/FileUtils.java
index 5515b6a..851ac35 100644
--- a/opendb-core/src/main/java/net/openio/opendb/tool/FileUtils.java
+++ b/opendb-core/src/main/java/net/openio/opendb/tool/FileUtils.java
@@ -24,11 +24,6 @@ public static void createDirectoryIfNotExists(String directoryPath) {
File directory = new File(directoryPath);
if (!directory.exists()) {
boolean success = directory.mkdirs();
- if (success) {
- System.out.println("目录已创建:" + directoryPath);
- } else {
- System.err.println("无法创建目录:" + directoryPath);
- }
}
}
@@ -43,13 +38,8 @@ public static void createFileIfNotExists(String filePath) {
try {
boolean success = file.createNewFile();
- if (success) {
- System.out.println("文件已创建:" + filePath);
- } else {
- System.err.println("无法创建文件:" + filePath);
- }
} catch (Exception e) {
- System.err.println("创建文件时出现异常:" + e.getMessage());
+ e.printStackTrace();
}
}
}
diff --git a/opendb-core/src/test/java/net/openio/opendb/OpenDBTest.java b/opendb-core/src/test/java/net/openio/opendb/OpenDBTest.java
index a0db356..7a02909 100644
--- a/opendb-core/src/test/java/net/openio/opendb/OpenDBTest.java
+++ b/opendb-core/src/test/java/net/openio/opendb/OpenDBTest.java
@@ -22,24 +22,28 @@
import net.openio.opendb.mem.KeyValueGenerator;
import net.openio.opendb.model.ColumnFamilyDescriptor;
import net.openio.opendb.model.Options;
+import net.openio.opendb.model.Status;
import net.openio.opendb.model.key.Key;
import net.openio.opendb.model.key.KeyType;
import net.openio.opendb.model.value.Value;
import net.openio.opendb.model.value.ValueType;
+import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
public class OpenDBTest {
-
+//
// static OpenDB openDB;
// static ColumnFamilyHandle columnFamilyHandle;
-// static List keys=new LinkedList<>();
+// static List list =new LinkedList<>();
//
-// static final int THREAD_POOL_SIZE = 25;
+// static final int THREAD_POOL_SIZE = 1;
// static final int TASK_COUNT = 1;
// static final ExecutorService executorService = Executors.newFixedThreadPool(THREAD_POOL_SIZE);
//
@@ -83,11 +87,16 @@ public class OpenDBTest {
// for (int i = 0; i < 100000; i++) {
// Key key = KeyValueGenerator.generateRandomIntKey();
// Value value = KeyValueGenerator.generateRandomIntValue();
-//
+// list.add(key);
// openDB.put(key, value, columnFamilyHandle);
//
// }
//
+// for (Key key: list){
+// Status status=openDB.get(key,columnFamilyHandle);
+// System.out.println(status.date);
+// Assertions.assertTrue(status.date!=null);
+// }
// }
// }
}
diff --git a/opendb-core/src/test/java/net/openio/opendb/compaction/CompactionIteratorTest.java b/opendb-core/src/test/java/net/openio/opendb/compaction/CompactionIteratorTest.java
index 9242129..747766b 100644
--- a/opendb-core/src/test/java/net/openio/opendb/compaction/CompactionIteratorTest.java
+++ b/opendb-core/src/test/java/net/openio/opendb/compaction/CompactionIteratorTest.java
@@ -48,11 +48,11 @@ public class CompactionIteratorTest {
// for (int i = 0; i < count; i++) {
// KeyValueEntry keyValueEntry = KeyValueGenerator.generateRandomIntKeyValueEntry();
// keyValue.add(keyValueEntry);
-// memTable.put(keyValueEntry);
+// memTable.put(keyValueEntry,0);
//
// KeyValueEntry keyValueEntry1 = KeyValueGenerator.generateRandomIntKeyValueEntry();
// keyValue.add(keyValueEntry1);
-// mem.put(keyValueEntry1);
+// mem.put(keyValueEntry1,0);
// }
//
// }
@@ -76,11 +76,9 @@ public class CompactionIteratorTest {
// ssTables.add(ssTable);
//
// CompactionIterator compactionIterator = new CompactionIterator(ssTables, storage, new BufferCache(
-// new LRUBufferCache<>(1000, 60, 60000, 1 << 19),
-// new LRUBufferCache<>(1000, 60, 60000, 1 << 19),
-// new LRUBufferCache<>(1000, 60, 60000, 1 << 19)
-// ),
-// new SequenceNumber(0L));
+// 1000, 60, 60000, 1 << 1)
+// ,
+// new SequenceNumber(0L));
// for (KeyValueEntry keyValueEntry : keyValue) {
// Assertions.assertEquals(keyValueEntry.getKey().getKey(), compactionIterator.next().getKey().getKey());
// }
diff --git a/opendb-core/src/test/java/net/openio/opendb/mem/SKipListRepTest.java b/opendb-core/src/test/java/net/openio/opendb/mem/SKipListRepTest.java
index a0486dd..4ba6121 100644
--- a/opendb-core/src/test/java/net/openio/opendb/mem/SKipListRepTest.java
+++ b/opendb-core/src/test/java/net/openio/opendb/mem/SKipListRepTest.java
@@ -31,6 +31,7 @@
import net.openio.opendb.model.key.DoubleKey;
import net.openio.opendb.model.key.FloatKey;
import net.openio.opendb.model.key.StringKey;
+import net.openio.opendb.model.value.Value;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.RepeatedTest;
@@ -106,12 +107,23 @@ public void end() {
private void addAndAssertKeyValueEntry(SkipListRep skipListRep, KeyValueEntry keyValueEntry) {
skipListRep.addKeyValue(keyValueEntry);
+ Value value=skipListRep.getValue(keyValueEntry.getKey(), new Comparator() {
+ @Override
+ public int compare(Key a, Key b) {
+ int d = a.compareTo(b);
+// if (d == 0) {
+// d = a.getSequenceNumber().compareTo(b.getSequenceNumber())>=0?0:1;
+// }
+ return d;
+ }
+ });
+ Assertions.assertEquals(value.getValue(),keyValueEntry.getValue().getValue());
}
@RepeatedTest(1024)
public void testIntKeyValueEntry() {
- KeyValueEntry keyValueEntry = KeyValueGenerator.generateRandomBytesKeyValueEntry();
+ KeyValueEntry keyValueEntry = KeyValueGenerator.generateRandomIntKeyValueEntry();
addAndAssertKeyValueEntry(intSkipListRep, keyValueEntry);
synchronized (intKeyValueList) {
intKeyValueList.add(keyValueEntry.getKey());
From bcd94e1a641b178fb2d5fd5b799b859f2bc0747a Mon Sep 17 00:00:00 2001
From: lyy <2424809934@qq.com>
Date: Tue, 17 Oct 2023 20:48:11 +0800
Subject: [PATCH 2/5] Test CI
---
.github/workflows/ci-opendb.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci-opendb.yml b/.github/workflows/ci-opendb.yml
index 3aee76c..9f6fd1d 100644
--- a/.github/workflows/ci-opendb.yml
+++ b/.github/workflows/ci-opendb.yml
@@ -49,4 +49,4 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: compile tests
- run: mvn test
+ run: mvn test -pl !benchmark -am
From 2fc1bf1613d2eee38706b666890a87acb6674557 Mon Sep 17 00:00:00 2001
From: lyy <2424809934@qq.com>
Date: Tue, 17 Oct 2023 20:50:54 +0800
Subject: [PATCH 3/5] Add Documentation
---
README.md | 8 ++++++++
.../src/main/java/net/openio/opendb/OpenDBBenchmark.java | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 9451799..a26040e 100644
--- a/README.md
+++ b/README.md
@@ -18,4 +18,12 @@ Based on LSM tree-structured database with up to 100,000 data writes per second.
openDB.put(key, value, columnFamilyHandle);
columnFamilyHandle=openDB.getColumnFamilyHandle("luoluoyuyu").date;
+```
+
+benchmark
+```
+Benchmark Mode Cnt Score Error Units
+OpenDBBenchmark.addKeyValue thrpt 134061.544 ops/s
+OpenDBBenchmark.getKeyValue thrpt 512352.366 ops/s
+
```
\ No newline at end of file
diff --git a/benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java b/benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java
index b26433f..f213843 100644
--- a/benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java
+++ b/benchmark/src/main/java/net/openio/opendb/OpenDBBenchmark.java
@@ -56,7 +56,7 @@ public class OpenDBBenchmark {
@Setup
public void stepUp(){
- openDB = OpenDBImp.open(new Options(), "D:/data/git/jDB/opendb-core/src/test/resources/data/");
+ openDB = OpenDBImp.open(new Options(), "opendb-core/src/test/resources/data/");
ColumnFamilyDescriptor columnFamilyDescriptor = new ColumnFamilyDescriptor();
columnFamilyDescriptor.setName("luoluoyuyu");
columnFamilyDescriptor.setKeyType(KeyType.intKey);
From 5745dd00c68b74c1bce8caac9b2c8e0e9a16a1d0 Mon Sep 17 00:00:00 2001
From: lyy <2424809934@qq.com>
Date: Tue, 17 Oct 2023 20:52:13 +0800
Subject: [PATCH 4/5] Add Documentation
---
.github/workflows/ci-opendb.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci-opendb.yml b/.github/workflows/ci-opendb.yml
index 9f6fd1d..7db2160 100644
--- a/.github/workflows/ci-opendb.yml
+++ b/.github/workflows/ci-opendb.yml
@@ -15,7 +15,7 @@
# limitations under the License.
#
-name: CI - FastProto
+name: CI - OpenDB
on:
pull_request:
branches:
From d0dc84c948f78854d1d92c0d9ed361bc7ec1ca2b Mon Sep 17 00:00:00 2001
From: lyy <2424809934@qq.com>
Date: Tue, 17 Oct 2023 20:54:36 +0800
Subject: [PATCH 5/5] Add Documentation
---
README.md | 2 --
1 file changed, 2 deletions(-)
diff --git a/README.md b/README.md
index a26040e..3924a1d 100644
--- a/README.md
+++ b/README.md
@@ -24,6 +24,4 @@ benchmark
```
Benchmark Mode Cnt Score Error Units
OpenDBBenchmark.addKeyValue thrpt 134061.544 ops/s
-OpenDBBenchmark.getKeyValue thrpt 512352.366 ops/s
-
```
\ No newline at end of file