MCPcopy Create free account
hub / github.com/e2wugui/zeze / startBench

Method startBench

ZezeJava/ZezeJavaTest/src/Dbh2/Dbh2FullTest.java:28–39  ·  view source on GitHub ↗
(int keyStart, int keyEnd, Database database, AbstractKVTable table, ByteBuffer value)

Source from the content-addressed store, hash-verified

26 }
27
28 private static Future<?> startBench(int keyStart, int keyEnd, Database database, AbstractKVTable table, ByteBuffer value) {
29 return Task.runUnsafe(() -> {
30 for (int i = keyStart; i < keyEnd; ++i) {
31 try (var trans = database.beginTransaction()) {
32 var key = ByteBuffer.Allocate();
33 key.WriteInt(i);
34 table.replace(trans, key, value);
35 trans.commit();
36 }
37 }
38 }, "");
39 }
40
41 @Test
42 public void testBench() throws Exception {

Callers 1

testBenchMethod · 0.95

Calls 6

runUnsafeMethod · 0.95
AllocateMethod · 0.95
replaceMethod · 0.65
commitMethod · 0.65
beginTransactionMethod · 0.45
WriteIntMethod · 0.45

Tested by

no test coverage detected