(int keyStart, int keyEnd, Database database, AbstractKVTable table, ByteBuffer value)
| 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 { |